cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pandra801
Level: Powered On

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

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

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

Community Support Team
Community Support Team

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,261)