cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnMacDougall
Advocate III
Advocate III

Patch new items to a choice column set of options

I have a choice column in dataverse for Teams. How can I update / add items, from a power app, to the possible set of choices?

 

2021-04-15_9-34-43.png

 

 

 

Patch('My Choice Column Options', Defaults(), {Value: "Choice 4"})

 

 


I'm trying to do something like the above, but I'm just getting red squiggle errors.

 

Is it not possible to update a set of choice other than manually editing it from the table? For this type of situation is the solution to create a new table and use a lookup column / relationship ?

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisPiasecki
Super User
Super User

Hi @JohnMacDougall,

 

The Choice options are part of the metadata (schema), so it's not possible to Patch in a new option without custom development and creating your own connector to start modifying metadata.

 

The general rule of thumb is, if the set of options are going to be fairly static / don't change often, then a Choice is the way to go. If you need to add/remove items often, the list is large, you need to make options inactive/active, or store additional fields along with the option, then instead creating a new table for these options and adding a lookup to your other tables that need to use this is the better approach. This will allow you to then Patch in new records to that table using Power Apps.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

2 REPLIES 2
ChrisPiasecki
Super User
Super User

Hi @JohnMacDougall,

 

The Choice options are part of the metadata (schema), so it's not possible to Patch in a new option without custom development and creating your own connector to start modifying metadata.

 

The general rule of thumb is, if the set of options are going to be fairly static / don't change often, then a Choice is the way to go. If you need to add/remove items often, the list is large, you need to make options inactive/active, or store additional fields along with the option, then instead creating a new table for these options and adding a lookup to your other tables that need to use this is the better approach. This will allow you to then Patch in new records to that table using Power Apps.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

@ChrisPiasecki  thanks for the explanation! I figured this might be the case, but thought I'd ask as I'm new to dataverse.

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Users online (70,914)