web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using dynamic content ...
Power Automate
Unanswered

Using dynamic content in IF( ) expression

(0) ShareShare
ReportReport
Posted on by 81

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?

Categories:
I have the same question (0)
  • Verified answer
    tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    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')

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard