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

What is wrong with this If expression?

 

if(body('Get_record_(Preview)_2')?['internalemailaddress']='peter@peter.com','360667578072','1')

I want to achieve that if the dynamic tag 'internalemailaddress' equals peter@peter.com then return 360667578072 else return 1

 

I get the message that it is invalid..

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: What is wrong with this If expression?

Hi @pepep,

 

Could you please share a screenshot of your flow's configuration?

 

I think there is something wrong with the formula that you provided. The "=" operator is not supported within the expressions (WDL expression) of Microsoft Flow currently.

 

Please take a try to modify your formula into the following formula:

if(equals(body('Get_record_(Preview)_2')?['internalemailaddress'],'peter@peter.com'),'360667578072','1')

More details about using expressions within flow actions, please check the following formula:

Use expression in flow actions

 

More details about the WDL expression within Microsoft Flow, please check the following article:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

 

 

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.

View solution in original post

pepep
Level: Powered On

Re: What is wrong with this If expression?

Hi @v-xida-msft,

 

Thank you so much! I've read the wiki on how to use the formula's and your suggestion did the trick.

 

Now extended it with a few more if-statements in the formula.

 

Lesson 1: read the f* manual 🙂

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: What is wrong with this If expression?

Hi @pepep,

 

Could you please share a screenshot of your flow's configuration?

 

I think there is something wrong with the formula that you provided. The "=" operator is not supported within the expressions (WDL expression) of Microsoft Flow currently.

 

Please take a try to modify your formula into the following formula:

if(equals(body('Get_record_(Preview)_2')?['internalemailaddress'],'peter@peter.com'),'360667578072','1')

More details about using expressions within flow actions, please check the following formula:

Use expression in flow actions

 

More details about the WDL expression within Microsoft Flow, please check the following article:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language

 

 

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.

View solution in original post

pepep
Level: Powered On

Re: What is wrong with this If expression?

Hi @v-xida-msft,

 

Thank you so much! I've read the wiki on how to use the formula's and your suggestion did the trick.

 

Now extended it with a few more if-statements in the formula.

 

Lesson 1: read the f* manual 🙂

View solution in original post

Eirik1337
Level: Powered On

Re: What is wrong with this If expression?

This is expression is invalid in my Flow:

If(true, "OK", "Not OK")
Used in a SharePoint "Update item" text box.

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
Users Online
Currently online: 339 members 6,657 guests
Please welcome our newest community members: