
Announcements
Hello! I've got a flow that I'm using to send out an email. I'm trying to use the Initialize Variable action to create a string to include in that email. The value for my Initialize Variable action is:
if(equals(outputs('Get_item')?['body/TravelAction/Value'],'Yes'),'Turn in travel card ending with outputs('Get_item')?['body/TravelCardNumber']','No travel card')
This expression is returning "Expression is Invalid" any time I try to save it. I am using dynamic content in the ValueIfTrue section of the IF() expression and that seems to be the problem. If I remove that content, the expression saves fine. I tried to use a preceding Initialize Variable to save that outputs('Get_item')?['body/TravelCardNumber'] content as a string and used the variable in the IF() expression instead, but had the same problem..
How can I include this dynamic content as a part of my ValueIfTrue?
Hello @ZachJayy ,
you can't build a string like this in an expression, to build a string in an expression you should use the concat(...) expression.
if(equals(outputs('Get_item')?['body/TravelAction/Value'],'Yes'),concat('Turn in travel card ending with', outputs('Get_item')?['body/TravelCardNumber']),'No travel card')