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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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,389)