web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Blank check fails for ...
Power Apps
Answered

Blank check fails for RichText field

(0) ShareShare
ReportReport
Posted on by 26
I have a multiple lines of text column in Powerapps which is of type RichText. The column has content like below when exported to excel. 
 
<p><br><br></p></div><p>​</p>
<p></p><p><br></p>
<p><br><br></p>
 
I am using this column in Powerapps visible property to show/hide this column. I noticed that the blank check passes for <p></p><p><br></p> and <p><br><br></p> but fails for <p><br><br></p></div><p>​</p>. May i know why?
 
Blank Check OnVisible of Datacard
If(
    !IsBlank(
        Trim(
            PlainText(
                LookUp(
                    'DataSource',
                    Country.Value = varCountry && State.Value = varState,
                    Q14
                )
            )
        )
    ),
    true,
    false
)
 
Categories:
I have the same question (0)
  • Kalathiya Profile Picture
    1,057 Super User 2026 Season 1 on at
     
    Please try below formula:
    If(
        !IsBlank(
            Trim(
                Substitute(
                    PlainText(
                        LookUp(
                        'DataSource',
                        Country.Value = varCountry && State.Value = varState,
                        Q14
                    )
                    ),
                    UniChar(8203),
                    ""
                )
            )
        ),
        true,
        false
    )
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------
     
    📩 Need more help? Mention @Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping!
  • WarrenBelz Profile Picture
    153,773 Most Valuable Professional on at
    I will add something here as @Kalathiya's response is almost correct except substituting "" (empty string) for a value fails the IsBlank test. The easiest way is use Len (length) of the returned data. Also you do not need If/true/false to return a Boolean value - just make a statement that has to be either true or false (see this blog of mine)
    Len(
       Trim(
          PlainText(
             LookUp(
                'DataSource',
                Country.Value = varCountry && 
                State.Value = varState
             ).Q14
          )
       )
    ) > 0
    So if the length is greater than zero (there are characters left in it), the statement will return true, otherwise it will return false. Note that there are also some hidden zero-length characters present (8203), however the Len() test also takes care of these in the code above.
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
  • Verified answer
    Assisted by AI
    Bitcot Automations Profile Picture
    4 on at
    Hi @Poweruser32490

    Your formula is logically correct, but it fails because Rich Text fields contain hidden characters even when the field looks empty.

     Your expression:
     If(
    !IsBlank(
    Trim(
    PlainText(
    LookUp(
    'DataSource',
    Country.Value = varCountry && State.Value = varState,
    Q14
    )
    )
    )
    ),
    true,
    false
    )
     
     
     

    Problem occurs in this case:

      <p><br><br></p></div><p>​</p>
     
     
     
     
      Inside <p>​</p> there is an invisible Unicode character (usually Zero-Width Space – Char(8203)).
      So Power Apps reads it like this:
     
    Step Result
    PlainText() "​"
    Trim() "​"
    IsBlank() False
     

    Even though visually it looks empty, Power Apps does not consider it blank.

    Also note:
    Trim() only removes normal spaces, not invisible Unicode characters.
     
    Best Solution 

     Remove invisible characters before checking.
      Clean + Check pattern
     
    Len(
    Trim(
    Substitute(
    PlainText(
    LookUp(
    'DataSource',
    Country.Value = varCountry && State.Value = varState,
    Q14
    )
    ),
    Char(8203),
    ""
    )
    )
    ) > 0
     
     
     
     

     

  • Assisted by AI
    Poweruser32490 Profile Picture
    26 on at
     
    I get an error while i apply above code. May i know how to solve this?
     
    The first argument to the char function must be between 1 and 255
     
  • WarrenBelz Profile Picture
    153,773 Most Valuable Professional on at
    Did you try what I  posted ? The reason I did not use Substitute was exactly that  - the character is not able to be referenced using Char(). As the character is zero-length, the Len (Length) function will test all other characterspresent, but not that one.
     
     
  • Poweruser32490 Profile Picture
    26 on at
    Hi @WarrenBelz,
     
    Yes i tried what you posted. However the issue occurs for <p><br><br></p></div><p>​</p>
     
  • WarrenBelz Profile Picture
    153,773 Most Valuable Professional on at
    The PlainText() function should delete those.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 105 Most Valuable Professional

#2
Haque Profile Picture

Haque 77

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 70

Last 30 days Overall leaderboard