cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pandra801
Regular Visitor

Using the AND expression - Syntax question

Hello,

 

Trying to get past something that I expected to be easy:

 

If Y/N field 1-HR Complete is set to true AND the value of text field Progress is set to Step 1, my condition should return as TRUE

 

It does not, and have verified that the data actually meets the condition. This is the code in advanced mode:

 

@and(equals(items()?['1-HR Complete']?['Value], True), equals(item()?['Progress']?['Value'], 'Step 1'))

 

Can someone point me in the right direction? 

 

AND expression.PNG

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User
Super User

The following formula worked for me:

and(equals(triggerBody()?['OData__x0031__x002d_HR_x0020_Complete'], true), equals(triggerBody()?['Progress'], 'Step 1'))

 

The field names were entered in the formula by selecting the via Dynamic data.

 

I successfully tested the following Flow:

 

And1.pngAnd2.pngAnd3.png

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

Scott

View solution in original post

2 REPLIES 2
ScottShearer
Super User
Super User

The following formula worked for me:

and(equals(triggerBody()?['OData__x0031__x002d_HR_x0020_Complete'], true), equals(triggerBody()?['Progress'], 'Step 1'))

 

The field names were entered in the formula by selecting the via Dynamic data.

 

I successfully tested the following Flow:

 

And1.pngAnd2.pngAnd3.png

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

Scott

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @Pandra801,

 

Could you please show more details about your SharePoint list?

 

I think there is something wrong with the formula that you specified within the Condition box of your flow. I have created a SharePoint list on my side and the data structure of it as below:22.JPG

Note: The 1-HR Complete column is a Yes/No type column in my SharePoint list and the Progress column and the TaskName column are both Single line of text type column.

 

Please take a try with the following workaround:

  • Add a "When an item is created" trigger, specify Site Address and List Name.
  • Add a Condition, click "Edit in advanced mode", type the following formula:

 

@and(equals(triggerBody()?['OData__x0031__x002d_HR_x0020_Complete'], true),equals(triggerBody()?['Progress'], 'Step 1'))

 

  • Within "If/yes" branch of Condition, add a "Send an email" action.

Note: Within Condition box, you could select 1-HR Complete dynamic content of the trigger within left input box and type true within right input box as below:25.JPG

Then when you click "Edit in advanced mode", the formula would be changed as below:26.JPG

 

Image reference:24.JPG

The flow works successfully as below:23.JPG

 

More details about using expression in flow actions, please check the following article:

Using expression in flow actions

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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