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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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,187 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard