Skip to main content

Notifications

Community site session details

Community site session details

Session Id : n8mxzOKJvkmig8/LMj7eHJ
Power Apps - Building Power Apps
Answered

Remove item from collection

Like (1) ShareShare
ReportReport
Posted on 24 Apr 2024 10:50:48 by 720

I'm using a collection to create a dropdown list 

 

I have oncheck 

 

Collect(
 EquipmentLis, /*create a collection to save the access equipment dropdown list*/
 ("Aframe"))

I thought i could do 

Remove(
 EquipmentLis, /*create a collection to save the access equipment dropdown list*/
 ("Aframe"))

but this does not work. 

 

I am not using a gallery and i dont want to clear all items from the list just the one thats been unticked.  

Categories:
  • amyharkus86 Profile Picture
    720 on 24 Apr 2024 at 12:50:06
    Re: Remove item from collection

    @iAm_ManCat Thank you, that's worked just as i needed. 

  • Verified answer
    iAm_ManCat Profile Picture
    18,206 Most Valuable Professional on 24 Apr 2024 at 12:42:33
    Re: Remove item from collection

    Hi @amyharkus86 

     

    When you collect the value to the collection, it is collected into a record which must have a field defined per value, as you specified no field, it defaulted to Value:

    image.png

     

    You can use remove in this way to achieve when you wanted:

    Remove(
     EquipmentLis,
     {Value: "Aframe"}
    )

     

    Cheers,

    Sancho

  • VishalJhaveri Profile Picture
    1,167 Super User 2025 Season 1 on 24 Apr 2024 at 11:42:25
    Re: Remove item from collection

    // Removing an item from a collection based on a condition
    Remove(MyCollection, LookUp(MyCollection, ID = 123))

  • amyharkus86 Profile Picture
    720 on 24 Apr 2024 at 11:35:04
    Re: Remove item from collection

    @VishalJhaveri i'm not using a Gallery1.

  • VishalJhaveri Profile Picture
    1,167 Super User 2025 Season 1 on 24 Apr 2024 at 10:52:23
    Re: Remove item from collection

    This is a Prompt Response.

     

    // Button's OnSelect property
    Remove(colItems, Gallery1.Selected); Refresh(Gallery1)

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,780 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard
Loading started