cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Power apps cannot convert text to an Option set value in Canvas Apps

We have a Canvas app where there is a combo box control which corresponds to Multi Select Option Set in Dynamics 365. In order to populate combo box we have filtered the data source of Dynamics 365 entities which uses CDS Current Environment Connector. 

 

Now, the combo box shows the Option set text and i think there is no possibility to retrieve the option set values from Dynamics 365.

So, I have created a collection which holds all the option set text and values. We need to get the keys of the selected options in that combo box control. We have retrieved the selected option set texts into a collection. Now that we have two collections (one with all the possible Option set texts and values) and another collection which contains the selected options 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Power apps cannot convert text to an Option set value in Canvas Apps

Hi @Chandanajcp ,

 

Is it a replicated thread? Whatever, I post my answer again.

 

Here is a easy solution, add a new column to store the option text in SelectedOptions Collection, and then filter by that column.

1.Create a new Collection with the OptionsText column

ClearCollect(SelectedOptionsText, AddColumns(SelectedOptions, "OptionsText", Text(Options)))

2. Filter based on the new collection.

ClearCollect(NewCollection, Filter(AllItems, Optionsettext  in SelectedOptionsText.OptionsText))

Hope this helps.

Sik 

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Power apps cannot convert text to an Option set value in Canvas Apps

Hi @Chandanajcp ,

 

Is it a replicated thread? Whatever, I post my answer again.

 

Here is a easy solution, add a new column to store the option text in SelectedOptions Collection, and then filter by that column.

1.Create a new Collection with the OptionsText column

ClearCollect(SelectedOptionsText, AddColumns(SelectedOptions, "OptionsText", Text(Options)))

2. Filter based on the new collection.

ClearCollect(NewCollection, Filter(AllItems, Optionsettext  in SelectedOptionsText.OptionsText))

Hope this helps.

Sik 

View solution in original post

Helpful resources

Announcements
secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,913)