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 / Validate if text is in...
Power Apps
Unanswered

Validate if text is in collection column

(0) ShareShare
ReportReport
Posted on by 145

Good day everyone,

 

I'm building an app and need to validate if a specific text is in collection column.

 

Example: Check if "Photo" text exists in Collection.Column.

Result: Photo - Sky.PNG

 

Something like that. can somebody help me?

 

Regards,

Categories:
  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @Davidx23 you can accomplish this with the Filter function

     

    Add the following to your canvas

    • Add a textbox 
    • Add a gallery
    • add a label in your gallery

    With the Gallery set Items = Filter(yourCollection, YouColumn = textInput.Text)

    With the label in your gallery, set the Text = ThisItem.yourColumn

     

    Hope it helps,

  • Davidx23 Profile Picture
    145 on at

    Rubin,

     

    No, the target is to validate if a document was uploaded by looking for its tag which is always at the beginning of its name as i mentioned in my previous post. So i need to validate that a Photo document was uploaded before save the data. to get this im trying to validate if the text "PHOTO" exists in the collection of my attachments file in order to proceed.

     

    Any other option to get it, will be welcome

  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    🙂 ok got it

     

    With the Gallery set Items = Filter(yourCollection, StartsWith( yourColumn,"Photo")

    This will return a gallery with all the items rows that does have the text Photo in the beginning. 

     

    Or you can add a column to a collection. ClearCollect(newCollection,AddColumns(yourCollection,"Text Exists", Left(Column, 5) = "Photo"))

     

    Now you can check that column if true it exists if false it doesnt.

     

    Hope this helps

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard