cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TirtaHema
Helper I
Helper I

How To Get Data from Dropdown

Hi all,

 

I have a canvas app that using Dataverse as the data source. I have several fields that using choice data type. How can I access the data? In this case, I want to use the value in that field to change the display mode of other fields and I want to sort a gallery using that value. I have tried some commands for example if the choice field called approval status.

 

If(ThisItem.'Approval Status'= 'Approve', DisplayMode.View, DisplayMode.Edit)

 

or if I want to Sort the gallery

Sort([Source],'Approval Status','Ascending')

 

Is anyone know how to get the value from the choice field? 

 

Thanks for your help

1 ACCEPTED SOLUTION

Accepted Solutions
JR-BejeweledOne
Super User
Super User

You may have to modify 'ThisItem.ApprovalStatus'.    If you type a period like so:  ThisItem.ApprovalStatus.  Do any choices like Value or Selected appear that you can choose from?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

3 REPLIES 3
JR-BejeweledOne
Super User
Super User

You can start by changing your formula like this:   If(ThisItem.'Approval Status' = "Approve", DisplayMode.View, DisplayMode.Edit)

 

Note the double quotes around the value Approve.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

Hi @JR-BejeweledOne 

 

I have tried your solution but it seems that I still got errors. the error I got is like in the picture below. Do I need to compare with the choice value, as we do in flow? Thanks

 

TirtaHema_0-1614042521771.png

 

JR-BejeweledOne
Super User
Super User

You may have to modify 'ThisItem.ApprovalStatus'.    If you type a period like so:  ThisItem.ApprovalStatus.  Do any choices like Value or Selected appear that you can choose from?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,673)