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 / Power Automate with MS...
Power Automate
Unanswered

Power Automate with MS Forms - Expression to output Dynamic Content based on content (or lack of) in a field

(0) ShareShare
ReportReport
Posted on by 4

I am just getting into PA and have searched quite extensively for this, but have not found an answer. I have an MS Forms questionnaire for our managers that has Yes/No questions with branching for things like, "Is the employees title changing?". If they answer Yes, it takes them to the questions "What is the new title?" and "What is their current title?". If they answer No, it takes them just to the question "What is their current title?". There are about 10 questions that are similar. At the end of the questionnaire I have a PA flow setup to insert the answers via Dynamic Content on a Word document template, then save that Word document. All pieces work just fine, except I am unsure how to setup the flow so that the information in the Dynamic Content is correct. In the example above I would need the Dynamic Content to filter based on an expression, something like "if 'new title' is NULL then output 'current title'". Any help with figuring this out, would be much appreciated. Thanks! Pa Post 2.pngPA Post.png

Categories:
I have the same question (0)
  • Rhiassuring Profile Picture
    8,690 Moderator on at

    Hi there, 

    You can use IF statements in your expressions to achieve what you're looking for - almost exactly as you worded it, too!   Use the expression tab, and your formula will look something like this: 

    Basically: if(empty('new title'),('current title'),('new title'))

     

    For example, in my scenario below, if the field (that long ID) is empty, I want it to write 'Empty' into the field; if it's populated, I want it to write in whatever the user typed in.

     

    if(empty(outputs('Get_response_details')?['body/r3cbfa311bdbc434190f4570ebd8b8f6c']),'Empty', outputs('Get_response_details')?['body/r3cbfa311bdbc434190f4570ebd8b8f6c'])

     

    Cheers,

     

    Rhia

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard