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 / Add Default Content fo...
Power Automate
Suggested Answer

Add Default Content for 'null' Value

(1) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2
I am passing data from a Power App to a Power Automate flow
and on to a SharePoint library and SharePoint list.

One of the Power Apps fields is 'Comments'. 

Comments are NOT required, which means there are times when
Power Apps will try to pass a 'null' (blank) value to the flow, which
triggers and error in Power Automate.

How do I craft an expression that will recognize the 'null' value
and replace it with the default 'No comment entered.', or if the
comment content is not 'null', pass the Power Apps entered content
to the flow? 
Categories:
I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    Hi,
     
    Please add an expression here to handle null values:
     
    if(empty(dynamic_content),null,dynamic_content)
     
    if(empty()) will solve this for you.
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    I tried a corrective action (see flow below). Will this work on the Flow side?

    I tried it and got the following error on the Power Apps side.

    Will your solution resolve this Power Apps error?


     
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    Hi,
     
    I use if(empty(dynamic_content), null, dynamic_content) and if(empty(dynamic_content), 0, dynamic_content) to handle blank values.  I recommend trying that expression on your comment field in create item.
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    I updated the flow to the following. I still got the same error message in Power Apps.

    Please advise.
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    Hi,
     
    We are close.  The issue is the entire entry is an expression, not directly typed in as you have it.
     
    New expression:  if(empty(dynamic_content_comments), null, dynamic_content_comments) 
     
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    I updated the expression. I still get the same error in Power Apps.

    I have confirmed the Power Apps 'comment' field is 'text_5', and that the field is currently blank.

    If I add 'No comment entered' back into the 'comment' field ('text_5') I don't get the error and
    the flow works fine.

    Expression: 
    if(empty(triggerBody()['text_5']), null, triggerBody()['text_5']) 

     
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    Hi,
     
    To confirm:  text_5 is your comment column?
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    Yes.
     
    Verified by the Update item expression writer, which auto-populated 'text_5'
    as the field in question when I updated the expression.


    Also, 'Comments' is shown as such in the trigger.

    And, to reiterate, if I manually enter 'No comment entered.' as the default
    content in the 'Comments' field of the Power App, the flow runs without
    error and the comment column of the library is populated with the default
    content.


    Only when I leave the 'Comment' field empty/blank do I get the Power Apps
    error message and flow fail.
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    Hey there!
     
    I am following up on this post add default content for 'null' value in this category general discussion from 10/24/2024.  I know the post is a little older, but it is a common question here so wanted to take a moment and follow-up. I see there have been 8 replies and 1 likes and asking if your question has been answered.  If so, please help the community out by completing one or more of the following actions!  Thanks in advance!
     
    Easy as 1-2-3 ‼️💯⭐😎🆒🙏
     
    1) Mark a reply as a verified answer - this is essential, and it helps others with the same general question find this thread. ✅
    2) You can also mark one of more replies as a verified answer.  Please take a moment and give the author credit for volunteering their time. ✌️
    3) Like one or more replies.  Kudos always greatly appreciated! 👍
     
    Pro tip:  if you found your own solution or workaround, feel free to add a reply to your own post and mark it as the solution too!  The goal is to get this thread marked with a verified answer by anyone that finds one or more replies helpful!
     
    Again, thanks in advance for reading and responding, always glad to help!  Tom 💯💯💯💯💯
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    If I can help with anything else please let me know or tag me in a future post, I enjoy reading and answering questions.  Always glad to help!  Tom 💯💯💯💯💯

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard