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

Patch a CDS option set from canva app

Hi

 

I'm trying to patch a CDS option set from my Canvas app using a button. 

 

The CDS entity is called 'alerts' the field is called 'Level" and the option set is called 'qrs_alertstate'. Alertstate has a few values; Critical, Warning and OK. 

 

for the life of me I can't get this to update. Here is my code: 

 

Patch([@Alerts], ThisItem, {Level : 'Level'.Okay})

 

can anyone help? 

 

thanks in advance

 

 

 

11 REPLIES 11

Hi @Dr_David_Banner ,

 

Yes, that is the problem.

 

The Option Set Name is Alert State, the code should be:

Patch([@Alerts], ThisItem, {Level : [@'Alert State'].'Okay'})

Hope this helps.

Sik

View solution in original post

@v-siky-msft 

 

Amazing, thank you very much, that's really helped me out 🙂 

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,411)