Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

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

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:
  • subsguts Profile Picture
    subsguts 1,259 on at
    Re: How can I create a Sequence for gallery items that will get updated everytime an item is added or removed?

    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 😉

     

     

  • subsguts Profile Picture
    subsguts 1,259 on at
    Re: How can I create a Sequence for gallery items that will get updated everytime an item is added or removed?

    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?

  • Mayuresh_Joshi Profile Picture
    Mayuresh_Joshi 54 on at
    Re: How can I create a Sequence for gallery items that will get updated everytime an item is added or removed?

    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
    subsguts 1,259 on at
    Re: How can I create a Sequence for gallery items that will get updated everytime an item is added or removed?

    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.

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

October 2024 Newsletter…

October 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #4 How to Conntact Support…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,473

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,659

Leaderboard