cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver III
Resolver III

Alternate ways to update Option Sets?

Is it possible to surface a way to modify CDS option set options in a canvas power app? Or any other automated way to adjust them, possibly with flow?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Alternate ways to update Option Sets?

Hi @Cooper01,

Thanks for clarifying. I would recommend instead of using optionset to use a lookup field and many-to-many relationship for multi-select scenarios. This would then allow you can grant the granular privileges to the right users who can managed the list of values and have a separate custom entity for each different types of lists.

If you absolutely need an optionset then the only way would be to invoke plugins to perform the schema updates. This can be done by having a custom entity named something like "Update Optionset Request" containing fields to identify what the changes are required. Then app would create a new request record that would then invoke a plugin to perform the actual changes. The plugin would need to be run on behalf of a "admin" type of user that has privileges to update the entity model.

Hope this helps!

View solution in original post

8 REPLIES 8
Highlighted
Super User II
Super User II

Re: Alternate ways to update Option Sets?

Hi @Cooper01,

Would it be possible to elaborate a little more? Do you want to update/add optionset item in a target environment (e.g. UAT, Prod)? By automated adjustment, do you need to update the values in your Dev environment to match values from another place/system? 

Cheers

Highlighted
Community Support
Community Support

Re: Alternate ways to update Option Sets?

Hi @Cooper01 ,

Do you want to modify the choices of the option set in a powerapps app?
I'm afraid it's not supported to do this in powerapps or flow.

You could only modify the choices of the option set in CDS.

Currently , in powerapps you could only update data in CDS. You could not change the table's structure of CDS in powerapps.

Actually, modifying the choices of the option set is a kind of change field's setting action, which is changing the table's structure.

This kind of action could only be done in its data source.

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Resolver III
Resolver III

Re: Alternate ways to update Option Sets?

Hi @EricRegnier , thanks for the response. I'm working on an app that is replacing a different system where end users can modify choices in drop down lists and combo boxes that appear in various forms and they want to bring this functionality over to Power Apps.

Typically if I were storing choices I would want to use an Option Set or Multi Select Option Set on the entity that stores form data. I don't want an end user going into CDS and edition option sets directly though. As a work around I was going to source the options on choice fields from an "option set" entity whose records they'd edit in an app. The issue with that though is that I can't think of a way to nicely store selected values from combo boxes in the form. I was leaning towards storing them in a text field using a special character to distinguish between each selected option but I would really prefer to store choice data as an actual option set field if I could.

Highlighted
Community Support
Community Support

Re: Alternate ways to update Option Sets?

Hi @Cooper01 ,

I'm afraid it's not supported to add/edit option for option set in powerapps.

You could only add/edit option for option set in CDS.

So to save new option in text field if you do not select any option in the combo box for option set is a good solution.

Then you manually edit option set based on this text field in CDS.

You could set the text field's Visible based on whether you select any option in the combo box for option set.

For example:

IsEmpty(optionsetcombobox.Selected)

//if select nothing, this datacard will be visible. Or else it will be invisible.

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Super User III
Super User III

Re: Alternate ways to update Option Sets?

If you want users to be able to modify options, you need to use a lookup field rather than an option set.

Lookup fields can still be displayed as drop downs in the app

Highlighted
Super User II
Super User II

Re: Alternate ways to update Option Sets?

Hi @Cooper01,

Thanks for clarifying. I would recommend instead of using optionset to use a lookup field and many-to-many relationship for multi-select scenarios. This would then allow you can grant the granular privileges to the right users who can managed the list of values and have a separate custom entity for each different types of lists.

If you absolutely need an optionset then the only way would be to invoke plugins to perform the schema updates. This can be done by having a custom entity named something like "Update Optionset Request" containing fields to identify what the changes are required. Then app would create a new request record that would then invoke a plugin to perform the actual changes. The plugin would need to be run on behalf of a "admin" type of user that has privileges to update the entity model.

Hope this helps!

View solution in original post

Highlighted
Super User III
Super User III

Re: Alternate ways to update Option Sets?

Agree @EricRegnier and i think it is also a good idea to ask "is it a good idea to have users adding options to the option set?" Just because the old system let you do that doesn't mean it is a good pattern--many systems with that capability wind up with junk in the option set and it becomes unusable. I've seen 25 "other" options or mis-spellings of options that people didn't find when they searched.

Highlighted
Resolver III
Resolver III

Re: Alternate ways to update Option Sets?

Totally agree @jlindstrom . The ability to add new options is not given to every user, just a small subset of the users who would be app admins. I have seen lots of bad/old data in their current system so I do know that is a very real problem. I'm also building in ability to remove an option. Unfortunately I can only surface this as a risk though as I am not the product owner

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (5,828)