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 Apps / Power Apps: Simple Str...
Power Apps
Unanswered

Power Apps: Simple String comparison

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

I have a SharePoint list with a rich-text column, say 'Acronym' and a column with a contact. In my PowerApp I have a text field in which I enter an acronym. The output in a label should be the contact name for the acronym that is looked up in the SharePoint list.

 

Example

Acronym in SharePoint (rich-text)

<div class="ExternalClass72348C84671546F7BCC878BB2A38DB7F"><div style="font-family&#58;Calibri, Arial, Helvetica, sans-serif;font-size&#58;11pt;color&#58;rgb(0, 0, 0);"><a href="https://link.com" title="ABC123"><span style="color&#58;black;">​<span>ABC123</span></span></a><br></div></div>

 

Acronym in PowerApps

PlainText(Acronym) -> "ABC123"

 

TextInput in PowerApps

ABC123

 

Label in PowerApps showing the name for the matching acronym

Name:

 

...nothing

 

 

 

So far I have:

 

First(LookUp(List; PlainText(Acronym) = TextInput.Text).Contact.DisplayName).DisplayName

 

 

PlainText(Acronym) gives me "ABC123" and TextInput.Text also. But the comparison PlainText(Acronym) = TextInput.Text returns false. Same with StartsWith()...

I also tried to compare the strings with IsMatch which doesn't work because of the two variables (you can only have a constant parameter as the second argument).

Even filtering the list and displaying it in a gallery component fails with this code:

 

 

Filter(List; PlainText(Acronym) = "ABC123")

 

 

 

Does this have anything to do with the PlainText()? Is it returning a different data type than Sting??

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Hey! On a label you must put the field you want from the lookup.

     

    Imagine that you have a list with 2 fields - Acronym and Title.

    You want to show title:

     

    LookUp(List; PlainText(Acronym) = TextInput.Text).Title

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • nichtzuhelfen Profile Picture
    4 on at

    Sadly that is not my problem. I updated my post to what I have for the Label. My problem is that the comparison fails for whatever reason.

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard