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 / If Expression within a...
Power Automate
Answered

If Expression within an e-mail

(0) ShareShare
ReportReport
Posted on by 20

I have entered a Forms response, which could be empty depending on the response. How do I write a condition that if it is empty it should show "/" instead of being blank when receiving an e-mail? In my case this is the response "Country" which comes from Microsoft Teams.

MMPowerAutomate_0-1665766421260.png

 

Categories:
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    NOTE: I noticed in the body of your email you have Please enter your Last Name twice. Was one of these supposed to be for First Name?

     

    The flow below should work if your Country field in MS Forms is of type Choice or Text.

     

    The flow adds a variable to hold the final output of Country. It then uses a condition to check if the user entered/selected a Country or not. If they did then it sets the Country variable to the actual Country, otherwise it sets it to /

     

    You can then use the Country variable within your email.

     

    See flow below:

    grantjenkins_1-1665794980280.png

     

  • MMPowerAutomate Profile Picture
    20 on at

    Thank you for your reply. Yes, it is a text. Unfortunately I am still getting empty e-mail and I do not see the "/". 

    MMPowerAutomate_0-1666014462940.pngMMPowerAutomate_1-1666014495232.png

     

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @MMPowerAutomate ,

     

    Please replace the condition

    SudeepGhatakNZ_0-1666068729484.png

     

     

    with

     

    SudeepGhatakNZ_1-1666068801680.png

     

  • MMPowerAutomate Profile Picture
    20 on at

    Hi SudeepGhatakNZ

     

    The moment I do that, I get following message and the flow does not work.

    MMPowerAutomate_0-1666109119299.pngMMPowerAutomate_1-1666109133520.png

     

  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    HI @MMPowerAutomate ,

     

    That error does not seem to be related to this change. Are you able to show me your expression?

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    This error can happen when you are building the flow and you add an action that requires a connection you haven't used in the flow yet and you just click Test.

     

    If that's the case, then you'll need to actually Run the flow which will prompt you to either authenticate with an existing connection you already have or create a new one. After that just clicking on Test will work fine.

     

    How did you go with the actual condition and showing /

  • MMPowerAutomate Profile Picture
    20 on at

    Thank you, @SudeepGhatakNZ  and @grantjenkins , both solutions worked. The problem was that in the last step (e-mail outlook) I did not select the newly defined name of the variable, but the output from the survey, which led to an error.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard