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 Apps / If IsBlank formula not...
Power Apps
Answered

If IsBlank formula not behaving as expected

(0) ShareShare
ReportReport
Posted on by 13

I have a patch function which should write in a Sharepoint List the value for "Compiled" if it is not blank, or the value for "Median" if else.

 

I wrote the following statement for the patch: 

Patch(results;First(Filter(results; ID= compiled_ID ) ); { evaluation: If(IsBlank(compiled);median;compiled)})

For some reason, it only works on reverse:

Patch(results;First(Filter(results; ID= compiled_ID ) ); { evaluation: If(Not(IsBlank(compiled));compiled;median)})

 

Does anyone have an explanation for this? Is it a known bug?

Thanks!

Categories:
  • Verified answer
    GarethPrisk Profile Picture
    2,828 on at

    It may depend on the column type, and what value it may have within it. There are scenarios where a string like "" is actually there, and that's not actually a blank value.

    Another option, is to leverage Coalesce (which uses first non-null value).

    Patch(results;First(Filter(results; ID= compiled_ID ) ); { evaluation: Coalesce(compiled;median)})

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-isblank-isempty

     

    I have seen some mixed behavior with IsBlank, IsBlankOrError, etc. but it's usually traceable (i.e. has a reason for not working - maybe data mismatched, data source varations, etc.). It's definitely preferable to having to write complicated statements to get the output you want.

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 Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard