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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,057)