Power Apps Get Value Of Choice Field Dataverse

In this Power Apps Dataverse tutorial, We will discuss Power Apps Get Value Of Choice Field Dataverse.

Also, we will cover the topics below:

  • How to get a specific Dataverse choice value using Power Apps Label Control
  • How to get a Dataverse choice value using Power Apps Combobox Control
  • How to retrieve a Dataverse choice value using Power Apps Dropdown Control

Read: How to Display Dataverse Choices in Power Apps Gallery

Power Apps Get Value Of Choice Field Dataverse

At first, Power Apps Get Value Of Choice Field Dataverse what does this mean? Let’s understand this first.

  • I have a Dataverse table named Patient Registrations. This table has various columns along with a Choice column called Reason.
  • This Reason choice column is having with all these below choice values like High Blood Pressure, Diabetes, Heart Issues, etc. Where the Patient Disease Reasons is my Choice Display name.

NOTE:

Don’t know how to create a Choice Column in Dataverse? No worries. Refer this complete tutorial to know everything about Dataverse Choice Column.
Power Apps Get Value Of Choice Field Dataverse
Power Apps Get Value Of Choice Field Dataverse
  • Moreover, the Dataverse table (Patient Registrations) has some below records:
How to get Dataverse choice value in Power Apps
How to get Dataverse choice value in Power Apps
  • Now I would like to get a specific Dataverse Choice value in Power Apps. For example, Gene Gorg is a patient whose symptoms include High Blood Pressure and a Cold. I want to retrieve this patient’s specific choice values using Power Apps.

We can achieve this need by using some of the Power Apps input controls like:

  1. Get a specific Dataverse Choice Value using Power Apps Label Control
  2. Get a specific Dataverse Choice Value using Power Apps Combobox Control
  3. Get a specific Dataverse Choice Value using Power Apps Dropdown Contol
See also  How to use Power Apps List box control?

Get a specific Dataverse Choice Value using Power Apps Label Control

Here, we will see how to get a specific Dataverse Choice value using a Power Apps Label control.

In Power Apps, insert a Label control (where you want to display the patient disease reason) and apply the code below on its Text property as:

NOTE:

Make sure to connect the Dataverse connector and choose the appropriate Dataverse table before adding the code to the Power Apps Label control. Otherwise, you might have certain issues.
Text = Concat(
    LookUp(
        'Patient Registrations',
        'Patient Name' = "Gene Gorg"
    ).Reason,
    Text(Value),
    "; "
)

Where,

  1. Concat = Power Apps CONCAT function in Power Apps is used to concatenate two or more strings together. This function allows you to combine different pieces of text, or even data from multiple fields or columns, into a single string.
  2. LookUp = Power Apps LookUp function is used to search for a single record in a data source that matches specified criteria. This function can be used to retrieve data from a table or list based on a specific value in one or more fields.
  3. ‘Patient Registrations’ = Provide the Dataverse Table name.
  4. ‘Patient Name’ = Specify the Dataverse Column name of whom you want to display the choice values.
  5. “Gene Gorg” = Enter the Person or Patient name of whom you want to display the choices.
  6. Reason = Provide the Dataverse Choice Field name.
  7. Text(Value) = The Power Apps Text function transforms any data type into a text representation using a predefined format.
  8. “; “ = This is the separator that helps to separate the choice values inside the label control.

Once you applied the code in the label control, the result (specific Dataverse Choices) will appear as shown below.

Get a specific Dataverse Choice Value using Power Apps Label Control
Get a specific Dataverse Choice Value using Power Apps Label Control

This is how to get a specific Dataverse Choice Value using Power Apps Label Control.

See also  Power BI Measure SUM - Complete tutorial

Also, Read: Dataverse Primary Name Column Autonumber

Get a Dataverse Choice Value using Power Apps Combobox Control

Next comes to how to get a Dataverse Choice value using Power Apps Combobox control.

In Power Apps Screen, add a Combobox control (where you want to display the patient disease reason) and apply the code below on its DefaultSelectedItems property as:

NOTE:

When adding the code to the Power Apps Combobox control, make sure the Dataverse connector is connected and that the proper Dataverse table is selected. If not, you can experience certain problems.
DefaultSelectedItems = LookUp(
    'Patient Registrations',
    'Patient Name' = "Gene Gorg"
).Reason

Where,

  1. ‘Patient Registrations’ = Dataverse table name
  2. ‘Patient Name’ = Specify the Dataverse Column name of whom you want to display the choice values.
  3. “Gene Gorg” = Enter the Person or Patient name of whom you want to display the choices.
  4. Reason = Provide the Dataverse Choice Column name

You can see the output (specific Dataverse Options) after applying the code in the Combobox control below.

Get a Dataverse Choice Value using Power Apps Combobox Control
Get a Dataverse Choice Value using Power Apps Combobox Control

This is how to get a Dataverse Choice Value using Power Apps Combobox Control.

Check out: Filter Dataverse Choice Column [With Various Examples]

Get a Dataverse Choice Value using Power Apps Dropdown Control

Here, we will overlook how to get a Dataverse Choice Value using Power Apps Dropdown Control.

In this case, I would like to get the Dataverse choice values of Ronald Crust (3rd record from the above Dataverse table).

To work around this, We will apply the same above code (Get a Dataverse Choice Value using Power Apps Combobox Control) in the Dropdown control.

NOTE:

Ensure to connect the Dataverse connector and choose the appropriate Dataverse table before adding the code to the Power Apps Dropdown control. Otherwise, you might have certain issues.

Insert a Dropdown control and put the code below on its Items property as:

Items = LookUp(
    'Patient Registrations',
    'Patient Name' = "Ronald Crust"
).Reason

Where,

  1. ‘Patient Registrations’ = Provide Dataverse table name.
  2. ‘Patient Name’ = Specify the Dataverse Column name of whom you want to display the choice values.
  3. “Ronald Crust” = Enter the Person or Patient name of whom you want to display the choices.
  4. Reason = Provide the Dataverse Choice Column name.
Get a Dataverse Choice Value using Power Apps Dropdown Control
Get a Dataverse Choice Value using Power Apps Dropdown Control

Finally, Save, Publish, and Preview the app. Once you will expand the Dropdown control, you can see all the dataverse choice values of a specific item or person as below.

How to get Dataverse Choice Value using Power Apps Dropdown Control
How to get Dataverse Choice Value using Power Apps Dropdown Control

This is how to get a Dataverse Choice Value using Power Apps Dropdown Control.

See also  Power Apps Timer Control Examples

Furthermore, you may like some more power apps tutorials:

In this Power Apps Dataverse tutorial, We discussed everything about Power Apps Get Value Of Choice Field Dataverse. Also, we covered the topics below:

  • How to get a specific Dataverse choice value using Power Apps Label Control
  • How to get a Dataverse choice value using Power Apps Combobox Control
  • How to retrieve a Dataverse choice value using Power Apps Dropdown Control
>