Trying the following if statement. When I write importance out to anothe field, it's 1 or 2 (depending on importance of email). But trying this expression in a field it errors saying invalid
Solved! Go to Solution.
I just experienced something similar. I couldn't get the most basic if statement to work in the expression box. the following threw the same error you reported:
if(1=2,1,2)
But the following worked:
if(equals(1,2),1,2)
So, perhaps try:
if(equals(triggerBody()?['Importance']),2),true,false)
Edit: Of course, Flow is using Workflow Definition Language. For a moment I had gotten confused and was using PowerApps syntax. the reference for WDL functions is here:
https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#functions
So, in PowerApps, 1=1 is fine, but in Flow, we should use equals(1,1)
Hi @DavidLozzi,
Take a try to format the importance with int() function:
if(int(triggerBody()?['Importance']) = 2,true,false)
See if this would make any difference.
Regards,
Michael
No dice,
if(int(triggerBody()?['Importance'])=2,true,false)
I just experienced something similar. I couldn't get the most basic if statement to work in the expression box. the following threw the same error you reported:
if(1=2,1,2)
But the following worked:
if(equals(1,2),1,2)
So, perhaps try:
if(equals(triggerBody()?['Importance']),2),true,false)
Edit: Of course, Flow is using Workflow Definition Language. For a moment I had gotten confused and was using PowerApps syntax. the reference for WDL functions is here:
https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#functions
So, in PowerApps, 1=1 is fine, but in Flow, we should use equals(1,1)
Power Automate User Groups are coming! Make sure youโre among the first to know when user groups go live for public preview.
User | Count |
---|---|
13 | |
12 | |
9 | |
7 | |
4 |
User | Count |
---|---|
11 | |
10 | |
5 | |
5 | |
4 |