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 / ClearCollect, collect ...
Power Apps
Answered

ClearCollect, collect all ID that starts with text input value

(0) ShareShare
ReportReport
Posted on by 2,567

Hi

 

Im trying to create a collection each time i enter something in a textinput.

ClearCollect(
 collectNew,
 Filter(
 TestList,
 (IDsingle = TextInput.Text)))

My issue is that it needs to be an exact match for it to collect, i want to collect the first 500 items that contains something like the text input.

 

For example if i type in the textinput = 2020 i want it to collect all items that contains 2020 in the IDSingle column. Currently it will only collect the exact input and if i dont know the exact input i will not generate anything

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JimmyWork 

    Try changing your formula to the following:

    ClearCollect(
     collectNew,
     Search(
     TestList,
     TextInput.Text, "IDsingle")
     )

     

    I hope this is helpful for you.

  • JimmyW Profile Picture
    2,567 on at

    @RandyHayes Thank you for answering but if i use Search i get a delegation warning my list has more then 2000 items

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @JimmyWork 

     

    Can you try to update the expression as:

    ClearCollect(collectNew,Filter(TestList,TextInput.Text in IDsingle))

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • JimmyW Profile Picture
    2,567 on at

    @yashag2255 Thank you but this also give me a delegation warning

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JimmyWork 

    If your list has more than 2000 items, then using Search, Filter or the in operator as @yashag2255 mentioned, will not work as they are not delegable. 

    You will need to devise another strategy for doing your search.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @JimmyWork 

     

    What is the datasource that you are using?

     

    If you wish to collect only first 500 records, then you can ignore the warning as the soft limit set for delegation is 500 by default.

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • JimmyW Profile Picture
    2,567 on at

    @yashag2255 My datasource is a SharePoiint list.

     

    So do i understand it correctly that it will collect the 500 first items that contains what i enter?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JimmyWork 

    As mentioned by @yashag2255  -  Although if your search results are outside of the 2000 limit, you will not get them in your 500 results.

    In other words, if item 2001 meets your search criteria, it will not be in your list of 500.

  • JimmyW Profile Picture
    2,567 on at

    @RandyHayes Thank you i understand now.

    So currently my formula works it will get the item even if it's item 2001 but i need the exact ID string and i would like to collect everything that starts with for example 9 in the ID string and get the 500 items that matches this

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JimmyWork 

    But, reading back at your post - you want to get results for a field that StartsWith what you type?

    If that is the case, then you can use the StartsWith operator instead.  It is delegable on Text columns.

     

     

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard