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

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
Highlighted
Community Support
Community Support

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

Highlighted

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

4 REPLIES 4
Highlighted
Community Support
Community Support

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

Highlighted

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

Highlighted
Advocate I
Advocate I

This is expression is invalid in my Flow:

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

I'm sorry but it doesn't work with me.

 

if(equals(body('Obter_detalhes_da_resposta')?['Pergunta'],'10'), 'Yes''No')
or
if(equals(item()?['Pergunta'],'10'), 'Yes''No')
 
I get 'No' all the time.
I'm trying to get data from Forms.
Thanks.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (8,610)