Hello,
I would like to ask how I can use finction if in Compose or Switch action.
If I put into Compose @if(empty(triggerBody()?['OData__x0070_jm1']?['Email']),'2','1') and then in email body use the compose output component, I have in message string"@if(empty(triggerBody()?['OData__x0070_jm1']?['Email']),'2','1')" not the result, which should be 2 or 1.
The same is if I want to use this expression in Switch - looks like no value like 2 or 1 is returned.
Is there some problem? Can I somhow retriew the result value? And is possible to use empty check on element of Person email field?
Thank you
Solved! Go to Solution.
Hi @ivan_stricek,
If you would like to use Compose Action, the input should be double quoted:
"@if(empty(triggerBody()?['OData__x0070_jm1']?['Ema
And yes, the empty function would work here.
For the Switch Action, use the Compose Output as the parameter.
Please note: If 1 and 2 are single quoted under the if functiion as the Compose Input, then when use compose output in Switch, the Equal value should be:
"2"
or
"1"
If you would like to use 2 instead of "2", change the Compose input with the formula below:
"@if(empty(triggerBody()?['OData__x0070_jm1']?['Ema
Regards
Hi @ivan_stricek,
If you would like to use Compose Action, the input should be double quoted:
"@if(empty(triggerBody()?['OData__x0070_jm1']?['Ema
And yes, the empty function would work here.
For the Switch Action, use the Compose Output as the parameter.
Please note: If 1 and 2 are single quoted under the if functiion as the Compose Input, then when use compose output in Switch, the Equal value should be:
"2"
or
"1"
If you would like to use 2 instead of "2", change the Compose input with the formula below:
"@if(empty(triggerBody()?['OData__x0070_jm1']?['Ema
Regards
Yes double quotes, thank you. It is little confucing if I have to use double quotes in Compose but not in advance Condition.
One more question, is possible to change code in Copmpose component after saving? It becomes gray and if I need to change a code little bit, I have to delete rest of workflow with this component and create it again, because gray part is not possible to change..
Thank you
No, it is not available to edit it for formula used under Compose, which currently is a limitation.
Please consider submit this as an idea if you would like the Compose Input to be editable after saving.
https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas
regards
thank you for help..
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |