Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Microsoft Form - Power Automate - Skip if field is blank

(0) ShareShare
ReportReport
Posted on by 11

Hi

 

I have a question in Microsoft Automate which is

 

Who is the user replacing ?

 

If the field is blank then power automate will return an "empty space" in the email template but if someone adds a name there it'll populate the text based on that question

 

I can't get my head around in writing such a expression ?

 

I looked it up online and came up with this but it doesn't work?

 

if(empty(outputs('Get_response_details')?['body/r12d7018def464ca5828cd172d90b418c'],null,outputs('Get_response_details')?['body/r12d7018def464ca5828cd172d90b418c']))

 

  • Verified answer
    creativeopinion Profile Picture
    10,439 Super User 2025 Season 1 on at
    Re: Microsoft Form - Power Automate - Skip if field is blank

    @babypoo10112 The empty() function takes a single parameter—object, array or string. It returns a true/false value.

    creativeopinion_0-1716777626221.png

     

    Tip: Pay attention to the tooltip when entering an expression. It will provide you with information on the parameters each function takes. If a function takes more than one parameter the current parameter that is being set will be bolded.

     

    In your expression you are trying to pass two parameters in the empty() function. The if() function takes three parameters.

    if([true/false],[true value],[false value])

     

    if(empty(outputs('Get_response_details')?['body/r873b3ad0ff3a4d35be02eb548332e073']),'No FSP Number',outputs('Get_response_details')?['body/r873b3ad0ff3a4d35be02eb548332e073']) 

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • babypoo10112 Profile Picture
    11 on at
    Re: Microsoft Form - Power Automate - Skip if field is blank

    Is this right?

     

    if(empty(outputs('Get_response_details')?['body/r873b3ad0ff3a4d35be02eb548332e073'],'No FSP Number'),outputs('Get_response_details')?['body/r873b3ad0ff3a4d35be02eb548332e073'])

     

    I still get an error

  • creativeopinion Profile Picture
    10,439 Super User 2025 Season 1 on at
    Re: Microsoft Form - Power Automate - Skip if field is blank

    @babypoo10112 Your expression isn't correct as you have the closing parenthesis of the empty function in the wrong spot. 

     

    if(empty(outputs('Get_response_details')?['body/r873b3ad0ff3a4d35be02eb548332e073'],outputs('Get_response_details')?['body/r873b3ad0ff3a4d35be02eb548332e073'],'No FSP Number'))

     As mentioned in my prev post, the if() function takes three parameters. The error you are receiving is telling you that you've only tried to pass a single parameter—because of where the empty() function's closing parenthesis is.

    if([true/false],[true value],[false value])

     

    if(empty(outputs('Get_response_details')?['body/r873b3ad0ff3a4d35be02eb548332e073']),outputs('Get_response_details')?['body/r873b3ad0ff3a4d35be02eb548332e073'],'No FSP Number')

     

    However, your function will output the empty value.. if the value is empty (with your expression above. You need to switch the last two parameters.

  • babypoo10112 Profile Picture
    11 on at
    Re: Microsoft Form - Power Automate - Skip if field is blank

    I tried your method but I get an error with the same template but if I use this

     

    if(empty(outputs('Get_response_details')?['body/r12d7018def464ca5828cd172d90b418c']),'Not a Replacement',outputs('Get_response_details')?['body/r12d7018def464ca5828cd172d90b418c'])
     
    The value is correct 
     
    However I am trying to use both your formula and the one I've used for the next set of question which is
     
    What is the Advisor FSP Number?
     
    if(empty(outputs('Get_response_details')?['body/r873b3ad0ff3a4d35be02eb548332e073'],outputs('Get_response_details')?['body/r873b3ad0ff3a4d35be02eb548332e073'],'No FSP Number'))
     
    Does the If/Empty formula work if the answer is a number?
     
    Unable to process template language expressions in action 'FSP_Number' inputs at line '0' and column '0': 'The template language function 'if' expects three parameter: the condition to test as the first parameter, the value to return if the condition is true as the second parameter, and the value to return if the condition is false as the third parameter. The function was invoked with '1' parameter(s). Please see https://aka.ms/logicexpressions#if for usage details.'.
  • creativeopinion Profile Picture
    10,439 Super User 2025 Season 1 on at
    Re: Microsoft Form - Power Automate - Skip if field is blank

    @babypoo10112 The if() function takes three parameters:

     

    if([true/false],[true value],[false value])

     

    Your original expression:

    if(empty(outputs('Get_response_details')?['body/r12d7018def464ca5828cd172d90b418c'],null,outputs('Get_response_details')?['body/r12d7018def464ca5828cd172d90b418c']))

    You need to switch the last two parameters:

    if(empty(outputs('Get_response_details')?['body/r12d7018def464ca5828cd172d90b418c'],outputs('Get_response_details')?['body/r12d7018def464ca5828cd172d90b418c'],null))

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

  • babypoo10112 Profile Picture
    11 on at
    Re: Microsoft Form - Power Automate - Skip if field is blank

    I looked at this

     

    https://www.spguides.com/power-automate-if/

     

     

    babypoo10112_0-1716766992162.png

     

    then i applied it to my flow

     

    if(empty(outputs('Get_response_details')?['body/r12d7018def464ca5828cd172d90b418c'],'Nothing',outputs('Not_a_Replacement')))
     
    But I get this error
     
    InvalidTemplate. Unable to process template language expressions in action 'Compose_2' inputs at line '0' and column '0': 'The template language function 'if' expects three parameter: the condition to test as the first parameter, the value to return if the condition is true as the second parameter, and the value to return if the condition is false as the third parameter. The function was invoked with '1' parameter(s). Please see https://aka.ms/logicexpressions#if for usage details.'.

     

  • babypoo10112 Profile Picture
    11 on at
    Re: Microsoft Form - Power Automate - Skip if field is blank

    The empty formula works and it returns a TRUE or FAlSE value. 
    It is correct.

    The next question is to add the IF expression?

    But I don't understand how to formulate the expression

     

  • creativeopinion Profile Picture
    10,439 Super User 2025 Season 1 on at
    Re: Microsoft Form - Power Automate - Skip if field is blank

    @babypoo10112 To troubleshoot your expression, start with the empty() function first and validate the output.

    empty(outputs('Get_response_details')?['body/r12d7018def464ca5828cd172d90b418c']

    The empty function will return a boolean value. If the field is empty, it will output true. 

     

    If this expression returns false when you are expecting it to be true, then you'll need to troubleshoot that first. Can you confirm the output of that expression?

     

    In the meantime, you may be interested in these YT Tutorials:

     

    How to Get a Microsoft Form RSVP Response into a SharePoint List

     

    IN THIS VIDEO:

     How to get a Microsoft Form Response into SharePoint

     How to get a Microsoft Form ID

     How to get a Microsoft Form response

     How to Build a Microsoft Form with Conditional Fields

     How to used Branching in Microsoft Forms

     How to format Microsoft Form multiple choice responses for a SharePoint multi-choice column

     How to parse a Microsoft Form multiple choice response as string of text

     How to convert a text response to a number

     How to use the Switch action

     How to create a custom email confirmation for a Microsoft Form submission

     How to Create a Custom View in a SharePoint list

     How to use the Compose Action

     How to write Power Automate Expressions

     

    ----

     

    How to Get Microsoft Form File Uploads Attached to an Email 📧

     

    In this Microsoft Power Automate Tutorial I’m going to cover where file uploads from your Microsoft Forms are saved. I’ll also show you how attach the uploaded files to an email and how to dynamically name the files and customize the recipient of the email based on the selections made in your Microsoft Form. I will also cover how to handle responses that don’t include any file uploads.

     

    IN THIS VIDEO:

    ‌ Two types of MS Forms

    ‌ Where Microsoft Personal (OneDrive) Form File Uploads are Saved

    ‌ Where Microsoft Group Form File Uploads are Saved

    ‌ How to Add a File Upload Question to an MS Form

    ‌ How to get a Microsoft Form ID

    ‌ How to get a Microsoft Form Response

    ‌ How to Get the Dynamic Content Microsoft Form File Upload Content

    ‌ How to handle Single and Multiple Microsoft Form File Uploads

    ‌ How to use a Scope action to Organize and Group Your Flow Actions

    ‌ How to Get the File Content from an MS Form File Upload

    ‌ How to Collect All Files Uploaded to a MS Form and Attach to an Email

    ‌ How to Handle MS Form Response When a File Isn’t Uploaded

    ‌ How to Create an Email Key

    ‌ How to Send an Email to a Specific Recipient Based on Form Selection

    ‌ How to Create a Dynamic Output Based on Form Selection

     

    -----

    How to Add Microsoft Form File Uploads to a SharePoint List Item

     

    In this Microsoft Power Automate Tutorial I’m going to cover how to add file uploads to a SharePoint list item. First, I’ll show you how to get the file name and content from the File Uploads from your Microsoft Form, then I’ll show you how to add those files to a SharePoint item.

     

    IN THIS VIDEO:

     Two types of MS Forms

     Where Microsoft Personal (OneDrive) Form File Uploads are Saved

     Where Microsoft Group Form File Uploads are Saved

     How to Add a File Upload Question to an MS Form

     How to get a Microsoft Form ID

     How to get a Microsoft Form Response

     How to Get the Dynamic Content Microsoft Form File Upload Content

     How to handle Single and Multiple Microsoft Form File Uploads

     How to use a Scope action to Organize and Group Your Flow Actions

     How to Get the File Content from an MS Form File Upload

     How to Collect All Files from Multiple File Upload Questions

     How to Handle MS Form Response When a File Isn’t Uploaded

     How to Attach an MS Form Single File Upload to a SharePoint List Item

     How to Attach Multiple MS Form File Uploads to a SharePoint List Item

     How to Attach MS Form File Uploads to an Email

     

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492