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 Null user input help
Power Automate
Answered

IF Null user input help

(0) ShareShare
ReportReport
Posted on by 38

Hi All, 

 

I have a flow connected to a button in SharePoint. When the user clicks it they are prompted to enter links. The fields are not mandatory but if they do not populate the fields, the flow fails. I want to write an if statement in the create item step to avoid this. 

 

Can anyone help with this?

 

PowerBI87_0-1595255277179.png

PowerBI87_1-1595255332015.png

 

Thanks

Categories:
I have the same question (0)
  • Rahber Profile Picture
    1,935 on at

    You can use this dynamic expression

    if(empty(items('Apply_to_each')?['Status']),'Empty',items('Apply_to_each')?['Status'])

    items('Apply_to_each')?['Status'] is my SharePoint variable int this case, you can replace with yours

     

    Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

    Thanks,

    Rahber

  • PowerBI87 Profile Picture
    38 on at

    I tried this but its not working. Not sure if my syntax is off.

     

    PowerBI87_0-1595268060723.png

     

  • Rahber Profile Picture
    1,935 on at

    No Sir, not this way.

     

    This needs to be a dynamic expression.  and to know the expression for share point value however on the share point item and you will see the value that you have to use in dynamic expression

    expression.PNG

     

    Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

    Thanks,

    Rahber

  • PowerBI87 Profile Picture
    38 on at

    I see, I am not able to grab dynamic content from "For a Selected Item", only "Get Item"

     

    PowerBI87_0-1595277190299.png

    PowerBI87_1-1595277251918.png

     

  • PowerBI87 Profile Picture
    38 on at

    Tried this:

    PowerBI87_1-1595279914163.png

     

    PowerBI87_0-1595279883683.png

     

    if(isblank(variables('FW')),'Empty',items()?[variables('FW')])
     
    Getting error " 
    Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The template action 'Compose_2' at line '1' and column '9641' is not valid: "The template language function 'items' must have at least one parameter.".'.'"
     

     

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @PowerBI87 

     

    You can check out this post as well: https://www.bythedevs.com/post/how-to-pass-a-null-value-as-an-input-while-using-a-manual-trigger-in-ms-flow

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Rahber Profile Picture
    1,935 on at

    Use

     

    if(empty(variables('FW')),'Empty',variables('FW'))

    items()?[variables('FW')] is not a correct expression

     

    Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

    Thanks,

    Rahber

  • PowerBI87 Profile Picture
    38 on at

    Thank you so much for this!

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard