cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cchan000
Helper V
Helper V

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
Pstork1
Dual Super User III
Dual Super User III

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
Pstork1
Dual Super User III
Dual Super User III

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

@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')
Pstork1
Dual Super User III
Dual Super User III

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
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA 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

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (21,682)