Events
Power BI DataViz World Championships
Feb 14, 4 p.m. - Mar 31, 4 p.m.
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Makers can design basic forms and multistep forms to include choices columns defined in Microsoft Dataverse. This feature provides the ability for portal users to select multiple options while submitting data, and display views that include choices columns through lists.
You can design a basic form or an multistep form step in the website by using a Dataverse form that has a choices column to support the selection of multiple options. Website users can insert, modify, or clear the selection.
Screen showing a list of outdoor activities being created. The user expands the Select or search options box and selects some activities from the list that appears. The selected activities appear at the top of the window. The user enters the letters C a m in the box, and then selects the option Camping when it appears. At the top of the window in the list of activities, the user selects the Close button next to one of the options to deselect it.
You can define a choices column in a Dataverse view to display the multiple options that are available for the record in a list. The choices column supports quick search by typing a keyword to filter the list.
Note
Sorting a list by the choices column isn't supported.
Developers can design the website by using Liquid to retrieve the records from a Dataverse table. Choices columns can be retrieved while the data is being queried by using fetchXML or an entity view.
{% for choice in record.ChoicesColumn %}
{{ choice.Label }}
{{ choice.Value }}
{% endfor %}
Examples of choices for sample_outdooractivities values are shown in the following table.
Value | Label |
---|---|
1 | Swimming |
2 | Hiking |
3 | Mountain Climbing |
4 | Fishing |
5 | Hunting |
6 | Running |
7 | Boating |
8 | Skiing |
9 | Camping |
Examples of contact table values are shown in the following table.
'fullname' column | 'Sample_outdooractivities' column |
---|---|
Quinn Yarborough | 1,9 |
Avery Orton | 2 |
Yuri Maple | 4 |
Ravi Mundy | 2,3,8,9 |
{% fetchxml contacts %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="contact">
<attribute name="firstname" >
<attribute name="lastname" >
<attribute name="sample_outdooractivities" >
</entity>
</fetch>
{% endfetchxml %}
{% for item in contacts.results.entities %}
{
"First Name":"{{ item.firstname }}",
"Last Name":"{{ item.lastname }}",
"Outdoor Activities": [
{% for choice in item.sample_outdooractivities %}
{{choice.Label}},
{% endfor %}
]
}
{% endfor %}
{% entitylist id:page.adx_entitylist.id %}
{% for e in entityview.records -%}
{
"First Name":"{{ e.firstname }}",
"Last Name":"{{ e.lastname }}",
"Outdoor Activities": [
{% for choice in e. sample_outdooractivities %}
{{choice.Label}},
{% endfor %}
]
}
{% endfor -%}
Developers can use choices columns by using the Web API read, create, and update operations.
Read
GET \[Portal URI]\_api/contacts?$select=fullname,sample\_outdooractivities &$top=1
Response –
{
"value": [
{
"@odata.etag": "W/\\"1066412\\"",
"fullname":" Quinn Yarborough ",
"sample\_outdooractivities ":"1,9",
"sample\_outdooractivities @OData.Community.Display.V1.FormattedValue":"Swimming, Camping"
}
]
}
Create / Edit
Method – PATCH / PUT
\[Portal URI]\_api/contacts (guid)
Body –
{
"sample\_outdooractivities": "1,4,8",
}
Events
Power BI DataViz World Championships
Feb 14, 4 p.m. - Mar 31, 4 p.m.
With 4 chances to enter, you could win a conference package and make it to the LIVE Grand Finale in Las Vegas
Learn moreTraining
Module
Working with choices in Microsoft Dataverse - Training
Do you want to create standardized choice lists that you can use across all of your Power Apps? This module will show you how to create new or use standard choice lists called choices in Dataverse.
Certification
Microsoft Certified: Power Platform Functional Consultant Associate - Certifications
Demonstrate the use of Microsoft Power Platform solutions to simplify, automate, and empower business processes for organizations in the role of a Functional Consultant.
Documentation
Add custom JavaScript to a form
Learn how to add custom JavaScript to a form in Power Pages.
Learn how to create basic forms on a website.
Configure basic form metadata for Power Pages
Learn how to add and configure basic form metadata for a portal.