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 / Strange behaviour in s...
Power Apps
Unanswered

Strange behaviour in string comparison

(0) ShareShare
ReportReport
Posted on by 4

Hi,

I have a really strange problem with a string comparison.

 

In a SharePoint list I have two columns "Title" and "Link"  that looks like this:

TitleLink
ABC123https://mycompany.sharepoint.com/sites/MySharePointSite/SitePages/ABC123.aspx

 

In a simple power app I want to compare the title with the last part of the link. Because the link is encoded I have a quite complex Substitute formula to extract the last part:

 

 

Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(Substitute(

 Substitute(Link;"https://mycompany.sharepoint.com/sites/MySharePointSite/SitePages/";"");".aspx";"")

 ;"%20";" ");"%2E";".");"%2C";",");"%5F";"_");"%2D";"-");"%28";"(");"%29";")");"%26";"&");"%40";"@");"%C3%A4";"ä");"%C3%84";"Ä");"%C3%B6";"ö");"%C3%96";"Ö");"%C3%BC";"ü");"%C3%9C";"Ü");"%C3%9F";"ß"))

 

 

 

This gives me "ABC123". BUT now comes the strange part. I have tried different things that I put in a label:

nichtzuhelfen_0-1646218671566.png

In the first row on the left is the "Title" and on the right the converted "Link".

The second row shows the Len() of each of them. It says that the converted link has 7 characters (?)

The third row prints the first 3 characters of the converted link. Note that the blank space character " " does NOT come from the link, because I added it by hand after the colon. Like this: "First 2 characters: " & Left(converted; 3). So there is just "AB" from the link where it should be "ABC". The first character is just invisible or comes from the stars or whatever...

 

The last 3 rows are showing comparisons. The statements are working properly regarding the invisible first character from the row above. So "ABC123" is in "?ABC123" but not the other way round. "ABC123" is not starting or ending with "?ABC123". And "?ABC123" is also not starting with "ABC123" but is ending with this string.

 

One possible solution could be to shorten the converted link to the real length of the title:

 

 

Right(converted; Len(Title))

 

 

But I think this could be dangerous if the strange invisible character decides to appear at the end of the converted string.

 

Trim() also doesn't bing the solution, because the invisible character is no " ". It is something else. ANY IDEAS what this character could be?!?

 

 

Categories:
  • EddieE Profile Picture
    4,650 Moderator on at

    @nichtzuhelfen 

    What data type is your column ‘Link’? Is it Single line of Text or Hyperlink?

  • nichtzuhelfen Profile Picture
    4 on at

    Ah I forgot to mention. Title is single line and Link is multiple lines of text.

  • EddieE Profile Picture
    4,650 Moderator on at

    @nichtzuhelfen 

    Ok. I try to avoid using Multi line of text in my apps because they can cause some issues. If your links will fit inside a single line of text column I’d try using that and see if that corrects this behaviour?

     

    It may also have something to do with the format of your Multi line of text column. I think formats like ‘rich text’ can cause power app issues

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard