I am trying to write an if expression to return a specific value if the statement is true. Here is what I am hoping to accomplish.
I have a variable of type String: strAutoRenewValue that is set using a Yes/No column in SharePoint Document Library column. If the value is Yes, I want it to return "IS" or "IS NOT" if No. Below is what I have been I get expression not valid. What am I doing wrong?
Solved! Go to Solution.
Hi @Anonymous ,
Please try the following configuration:
if(equals(variables('strAutoRenewValue'),true),'IS','IS NOT')
Best Regards,
Hi @Anonymous ,
Thank you @ManishJain . When I tried to save I get the following error that I am not sure what to do with. Seems like variables in the expressions need to declare?
The template validation failed: 'The template action 'SetAutoRenewalValue' at line '1' and column '6094' is not valid: "The template function 'variables' is not expected at this location.".'.
Hi @Anonymous ,
Don't you have variable "strAutoRenewValue " declared at the beginning to be precise. Please share screenshot of your flow to help further.
Thanks
I do. Here is a screenshot.
If this is a SharePoint Yes/No column, you need to be testing in you if expression or condition for true or false and not Yes or No.
if(equals(strAutoRenewValue, true), 'IS', 'IS NOT')
Hi @Anonymous ,
Please try the following configuration:
if(equals(variables('strAutoRenewValue'),true),'IS','IS NOT')
Best Regards,
User | Count |
---|---|
87 | |
37 | |
25 | |
13 | |
12 |
User | Count |
---|---|
117 | |
55 | |
36 | |
23 | |
21 |