cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Community Support
Community Support

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
Community Support
Community Support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,659)