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 / loop through a collect...
Power Apps
Answered

loop through a collection of strings and compare the value

(0) ShareShare
ReportReport
Posted on by 172

I have a collection of strings, it stores string values. 

how do i compare if a values exists in the collections. 

is there an index of collections we can compare with? 

 

KDAI_1-1712667844707.png

I am storing a string split with space. now i need to check if each of the strings has some value. 

 

 

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

    Hi , @KDAI 

    For example , if i check if each of the strings has "2024". You can refer to this code:

    ClearCollect(collvarsplityted ,AddColumns( Split(TextInput1.Text, " ") ,"Flag" , IsMatch(Value,"2024",MatchOptions.Contains) ) );

     

    The result is as follows:

    vyueyunmsft_0-1712713360040.png

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard