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?
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.
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!
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.