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 / Comparing Strings in C...
Power Apps
Unanswered

Comparing Strings in Collection against SharePoint Multi line values

(0) ShareShare
ReportReport
Posted on by 4

Hello PowerApps Community,

 

Is there any way to Compare a list of collection items against SharePoint MultinLine text value in PowerApps?

 

Here is my scenario, I have a sharePoint multi-line column with multiple lines of names and I'm trying to compare the column with

a Collection of names entered by the user in PowerApps. Do I need to use flow or can this be done in PowerApps? Thank you!

 

 

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @bgr0511,

     

    Could you please share a bit more about your scenario?

    How do you want to compare the multi-line type column with the Collection of names within a PowerApps app?

     

    If you want to compare the multiple lines of text type column within a Collection of names within an app, please make sure that you have turned on/enabled the "Use enhanced rich text (Rich text with pictures, tables and hyperlinks)" option for the Multiple lines of text type column as below:3.JPG

     

    After that, you could split the Multiple lines of text type column value into a table value using Split function, and then you could compare the table value with a Collection within your app.

     

    I have created a SP list on my side, the data structure as below (only have one item):4.JPG

    Note: The EmployeeNames is a Multiple lines of text type column, which has enabled the "Use enhanced rich text (Rich text with pictures, tables and hyperlinks)" option.

     

    In order to split a Multiple lines of Text type column value (of the first item) into a Table value, add a Data table control within the screen of my app, set the Items property to following formula:

    Trim(Split(Substitute(Substitute(First('20180823_case9').EmployeeNames,"<div>",""),"</div>",""),"<br>"))

    The Table value shows up as below:6.JPG

     

    Add a Button control (Called "Add Collection") within the screen of my app, set the OnSelect property of the Button control to following formula:

    ClearCollect(
    Collection1,
    {Name:"Kris Dai",IsExisted:""},
    {Name:"Steven",IsExisted:""},
    {Name:"Teresa",IsExisted:""},
    {Name:"Eric",IsExisted:""}
    )

    The Collection shows up as below:5.JPG

     

    I assume that you want to compare the Table value within the Collection value within an app, if the Name within the Collection has been existed within the Table value, set IsExisted field to true, otherwise, set IsExisted field to false.

     

     

    Add a "Compare" button within the screen of my app, set the OnSelect property of this Button control to following formula:

    ForAll(
    RenameColumns(Collection1,"Name","Name1"),
    If(
    !IsBlank(LookUp(Trim(Split(Substitute(Substitute(First('20180823_case9').EmployeeNames,"<div>",""),"</div>",""),"<br>")),Result=Name1)),
    UpdateIf(Collection1,Name=Name1,{IsExisted:true}),
    UpdateIf(Collection1,Name=Name1,{IsExisted:false})
    )
    )

    The Collection would show up as below after clicking the "Compare" button:7.JPG

     

    Note: The "20180823_case9" represents the SP list data source within my app.

     

    The whole screenshot as below:

    8.JPG

     

    Best regards,

    Kris

     

  • bgr0511 Profile Picture
    4 on at

    Hey Kris, I followed the step by step process but the data table result gives me a html instead of the record values of the column. See the attached screenshots. Am I doing something wrong?

     

    Regards,

    bgr0511

    data table.png
    column creation.png
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @bgr0511,

     

    Just an update -- It is my fault, I have made a test on my side, the issue is confirmed on my side.

     

    I afraid that there is no way to achieve your needs in PowerApps currently. If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:
    https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

     

    Best regards,

    Kris

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard