cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cchan000
Level: Powered On

please help me fix my easy trigger conditions code

hi. sorry i don't know much about expressions, but i'm eager to learn and followed tutorials.

 

setting up a flow for people to receive an email when the status of a sharepoint field dropdown changes to "closed"

 

Is the below the correct formula to enter for trigger conditions?

 

@equals(triggerBody()?['Status']?['Closed'])

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: please help me fix my easy trigger conditions code

Your code is looking for a field called 'Closed' not checking a value.  Here's the right code.

@equals(triggerBody()?['Status']?['value'],'Closed')  

That's assuming you are using a choice field. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
Dual Super User
Dual Super User

Re: please help me fix my easy trigger conditions code

Your code is looking for a field called 'Closed' not checking a value.  Here's the right code.

@equals(triggerBody()?['Status']?['value'],'Closed')  

That's assuming you are using a choice field. 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

cchan000
Level: Powered On

Re: please help me fix my easy trigger conditions code

@Pstork1 

 

hi. i have one more question related to the answer you have given me.

 

i want it to trigger if the value equals Closed or Declined. how do i add an OR statement at the end?

 

equals(triggerBody()?['Status']?['Value'],'Closed')
Dual Super User
Dual Super User

Re: please help me fix my easy trigger conditions code

YOu wouldn't add it at the end.  YOu would wrap the whole thing in an @or

@or(equals(triggerBody()?['Status']?['value'],'Closed'),equals(triggerBody()?['Status']?['value'],'Pending'))


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,955)