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 Apps
Answered

undefined

(0) ShareShare
ReportReport
Posted on by 150

I have created a collection and that collection I am showing on a gallery.And in one gallery I am only showing the two title and i have added a delete icon. So i want when I click on one delete icon it delete the items from id 1 to 10 and when i click on 2nd delete icon it removes item from id 11 to 12

Categories:
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    @Moira0509 ,

    This will remove the first 10 from a gallery on each click - you just need to change the Sequence value if you want another quantity deleted 

    ForAll(
     Sequence(10),
     RemoveIf(
     YourGalleryDataSource,
     Id = Index(
     YourGalleryName.AllItems,
     Value
     ).Id
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Moira0509 Profile Picture
    150 on at

    It is showing error when I am trying to use it

    Moira0509_0-1671948060365.png

     

  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    @Moira0509 ,

    Firstly, please post all code also in Text, but have another look at what I posted, particularly the bracketing as yours is not the same.

  • Moira0509 Profile Picture
    150 on at

    ForAll(Sequence (25), RemoveIf(collocationinfowithNumber, rownumber=Index(GalleryTimezone1.AllItems,Value,rownumber=index(GalLeryTimezone2.AllItems,Value).rownumber)))

    I am using above formula

    Gallerytimezone1 is one gallery and Gallerytimezone2 is another gallery.

     

  • Verified answer
    WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    @Moira0509 ,

    That is still not what I posted (bracketing) - you are deleting records from a gallery by referring to its structure and removing the relevant records from the data source of the gallery. Also you cannot refer to two galleries unless they have the same structure and data source (then this will delete from both)

    ForAll(
     Sequence(25), 
     RemoveIf(
     collocationinfowithNumber, 
     rownumber = Index(
     GalleryTimezone1.AllItems,
     Value
     ).rownumber
     )
    )

    Assuming collocationinfowithNumber is the data source of GalleryTimezone1 and rownumber is a unique identifier, then this should work.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard