cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

Re: Using the AND expression - Syntax question

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
Highlighted
Super User III
Super User III

Re: Using the AND expression - Syntax question

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

Highlighted
Community Support
Community Support

Re: Using the AND expression - Syntax question

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Top Kudoed Authors
Users online (8,031)