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 from gallery
Power Apps
Answered

Clearcollect from gallery

(0) ShareShare
ReportReport
Posted on by 725

Hi everyone

I have a numerical  collection like 1,4,2,3 that I concat and then Patch to a record in a  database, like so, ProcedurePPE:Concat(PPEID,Value,",") but I don't know how to clearcollect it back into my PPEID collection when I select that record in the gallery.

I tried forall  and many other things but they did not work.

Any help would be appreciated.

Categories:
I have the same question (0)
  • timl Profile Picture
    36,785 Super User 2026 Season 1 on at

    Hi @Corissandageri 

    It looks like you're storing a comma-separated list of values in your database. Therefore, you can reconstruct the collection by calling the Split function.

    ClearCollect(PPEID,
     Split(Gallery1.Selected.ProcedurePPE,
     ","
     )
    )
  • R Bakker Profile Picture
    725 on at

    Hi timl

    Your formula works if I change the collection name, but does not like it if I use it under the original collection name. Almost like it's a different data type. Below is how I am collecting the original collection.

    If(!(ThisItem.ID in PPEID),Collect(PPEID,ThisItem.ID))

  • timl Profile Picture
    36,785 Super User 2026 Season 1 on at

    After you collect PPEID with the original formula, if you go to the Collections panel and inspect the contents, can you post a screenshot or post the column header names of PPEID?

  • Verified answer
    R Bakker Profile Picture
    725 on at

    Hi timl

    You were right I was collecting as a Values, then concat the values and saving in to a text column.  So

    ClearCollect(PPEID,
     Split(Gallery1.Selected.ProcedurePPE,
     ","
     )
    )

    This works if I collect from a text column.

    Thank you again

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
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard