Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Compare split(string) to a Text Column

(0) ShareShare
ReportReport
Posted on by 69

Hi

I want to use a Text Field to enter keywords (semicolon separated) which will be compare to a Text Column 'Mots Clefs', looking if any of the Keywords are a substring of the Column in order to filter a collection 'BoiteaOutils'

 

Bing Conversation (which can be very helpfull sometime) propose

Filter(BoiteaOutils;IsBlank(Critere.Text) || !IsEmpty(Filter(Split(Critere.Text;";");IsMatch('Mots Clefs';Result)))) 

or

Filter(BoiteaOutils;IsBlank(Critere.Text) || !IsEmpty(Filter(Split(Critere.Text;";");IsMatch('Mots Clefs';Result.Value)))) 

or

Filter(BoiteaOutils;IsBlank(Critere.Text) || !IsEmpty(Filter(Split(Critere.Text;";");IsMatch('Mots Clefs';Value)))) 

 

But none of these formulas works : the first and second have a "Result not a regognized name Error", the last a "Regex should be constant" error

 

Can you help me with the correct syntax ?

 

noter : a similar formula, to compare a combox with a multichoice field works fine but it seems the For All part cannot be used with a Text Column

ilter(BoiteaOutils;("Documents partages/General/" in 'Chemin d’accès au dossier') &&( IsBlank(LNature.SelectedItems.Value) || IsEmpty(LNature.SelectedItems) || true in ForAll(LNature.SelectedItems.Value;ThisRecord in Nature.Value)))

  • Flejoyeux Profile Picture
    Flejoyeux 69 on at
    Re: Compare split(string) to a Text Column

    Neither mind my previous comment. The solution works fine

     

     Filter(BoiteaOutils, 'Mots Clefs' in Critere.Text) will select all records in which any substing of 'Mots Clefs' match a substring of Critere

     

    Not exactly what i had in mind (in a second step, being able to find a group of word as a key or to choose to combine Or or And for multiple criterias) but simple and efficient enough from my V1

     

    Thanks a lot !

  • Flejoyeux Profile Picture
    Flejoyeux 69 on at
    Re: Compare split(string) to a Text Column

    i am afraid it is the other way round

    'Mots Clefs' field could be "Vidéo Droit à l'Image IA" for example

    and Critere in search box  "Vidéo;Anonymisation"

     

    The search should select all records wich has Vidéo or Anonymisation as substring of 'Mots Clefs' text string

  • Verified answer
    CNT Profile Picture
    CNT 10,919 on at
    Re: Compare split(string) to a Text Column

    @Flejoyeux 

    Please try the following,

    Filter(BoiteaOutils, 'Mots Clefs' in Critere.Text)
     

    Please remember to give a 👍 and accept my solution as it will help others in the future.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard