Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Numbering items to display in a gallery

(0) ShareShare
ReportReport
Posted on by 79

Hi,

 

I need some assistance with numbering items in a gallery. 

I have 2 tables in Dataverse:


Table 1: Application Table - Unique Identifier is Ticket Number 
Table 2: Comments Table - Unique Identifier is Comment Number

Whenever a comment is captured, its updated with its corresponding Ticket number in the comments table.

I have a gallery in the comments page that displays all the comments posted for a specific ticket however, the reference numbers are non-sequential as the comments are posted on different dates and times for different tickets.

Please see below image:

RG1601_0-1709820509663.png

 

The goals is to display the comment number in a sequential order within the gallery. I have used the approach in the article here however it's not as responsive as I would like it be when posting a new comment. Further to the above, it poses a different problem as the users can download the file in excel and then the sequence will be off again. 

Is it possible to create a column within the comments table that will automatically assign a sequential comment number for display within the gallery?

Example (Sequence Number):

Comment IdDate PostedTime PostedCorresponding TicketSequence Number
Comment - 12024/03/0111:57amTicket-11
Comment - 22024/03/0212:00pmTicket-71
Comment - 32024/03/0312:04pmTicket-12
Comment - 42024/03/0401:00pmTicket-51
Comment - 52024/03/0503:00pmTicket-72
Comment - 62024/03/0609:00amTicket-52
Comment - 72024/03/0705:00pmTicket-13
Comment - 82024/03/0806:15amTicket-73

 

Any help will be appreciated

Regards,

Categories:
  • citdevpros Profile Picture
    61 on at
    Re: Numbering items to display in a gallery

    Hi @RG1601 ,

    My understanding of DataVerse autonumbers is that you can't partition them by another column, they just don't allow that level of complexity.

     

    The simplest way to do this is to patch the Sequence Number value at the time the comment is submitted.

    1. Filter your Comment table for records that relate to the "Corresponding Ticket" value
    2. group and get max(Sequence Number) + 1, and
    3. write that as the sequence number of the newly created comment

    Better than doing a row-by-row evaluation every time you retrieve the comments for a ticket, and the correct sequence is available in a download of the data. The only thing this doesn't account for is renumbering if comments are deleted, if that is even a function you are implementing.

  • RG1601 Profile Picture
    79 on at
    Re: Numbering items to display in a gallery

    Hi @Jmanriquerios ,

    Thanks for the feedback, could you elaborate a bit more on how this could be achieved?

    Regards,

  • Jonathan Manrique Profile Picture
    2,678 on at
    Re: Numbering items to display in a gallery

    Hi @RG1601 

     

    You can use the autonumeric column in the dataverse, which is sequential and forms the number where the dataverse is not processed.

     

    Autonumber columns in Microsoft Dataverse - Power Apps | Microsoft Learn

     

     

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

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

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics