I have a variable called VarX and I want it to set to "X" if the corresponding SharePoint field is "YES", if the corresponding SharePoint field is "NO", I want to set "X" to either null or "".
How do you do this in an expression? `if(triggerBody()?[SPField] = 'YES','X',"")` something like that?
Solved! Go to Solution.
Hi!
This is a very useful reference when dealing with expressions
https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference
Hope this helps
Proud to be a Flownaut!
Proud to be a Flownaut!
Hi @Anonymous ,
What is the type of the SPField? Is it a single line of text column, or Yes/No type column, or a Choice type column?
Could you please share a screenshot of the configuration of your flow?
If the SPField is single line of text column, the Expression should as below the same as @efialttes provided:
if(equal(triggerBody()?['SPField'],'YES'),'X','')
If the SPField is Yes/No type column, the expression should as below:
if(equal(triggerBody()?['SPField'],true),'X','')
If the SPField is choice type column, the expression should as below:
if(equal(triggerBody()?['SPField']?['Value'],'YES'),'X','')
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi!
This is a very useful reference when dealing with expressions
https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference
Hope this helps
Proud to be a Flownaut!
Hi @Anonymous ,
Have your problem been solved? If yes, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!
Best Regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
95 | |
48 | |
21 | |
19 | |
18 |
User | Count |
---|---|
137 | |
54 | |
42 | |
41 | |
30 |