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 / How can I create a Seq...
Power Apps
Unanswered

How can I create a Sequence for gallery items that will get updated everytime an item is added or removed?

(0) ShareShare
ReportReport
Posted on by 520

This is how the gallery looks like.

Robert94_0-1666197603889.png

Add new row code:

Patch(S2T1_MeetingAgenda, Defaults(S2T1_MeetingAgenda), {Title:"", AgendaItem:""});
Collect(colMeetingAgenda, Last(S2T1_MeetingAgenda));

Remove item code:

Remove(S2T1_MeetingAgenda, LookUp(S2T1_MeetingAgenda, ID = ThisItem.ID));
RemoveIf(colMeetingAgenda, ID = ThisItem.ID);
Categories:
I have the same question (0)
  • subsguts Profile Picture
    1,259 Moderator on at

    I would read this solution and see if that gets you pointed in the right direction.  Sounds like they were doing something similar to what you want to do.

     

    Solved: Re: Numbered Items in a Gallery - Power Platform Community (microsoft.com)

     

    Let me know if this helps, or if this leads to more questions.  Thanks.

  • Mayuresh_Joshi Profile Picture
    54 on at

    Please refer below article:

    http://powerappsguide.com/blog/post/generating-row-numbers

     

    You need to add a column in your collection as "RowNumber" and use ThisItem.RowNumber as sequence column

  • subsguts Profile Picture
    1,259 Moderator on at

    I think the problem is that when you remove a row, how will the collection get renumber?  I think you'll have rebuild the collection each a user hits the "remove" button.  Thoughts?

  • subsguts Profile Picture
    1,259 Moderator on at

    Researching this some more, I found an old post that Randy Hayes discussed with another person.  I think it will be helpful and it does talk about the issue of having to reload the gallery when data is changed.  Hopefully, this will give you the info you need to get your solution working.  Randy's very knowledgeable, so I'll let this post to the talking 🙂

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Renumbering-Unique-IDs-when-item-is-deleted-in-a-Gallery/td-p/1771232

     

    Let us know what works for you and provide examples please.  I learn from reading this stuff, it's why I spend time trying to answer them as well 😉

     

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard