web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Numbering items to dis...
Power Apps
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,

I have the same question (0)
  • Jonathan Manrique Profile Picture
    2,687 on at

    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

     

     

  • RG1601 Profile Picture
    79 on at

    Hi @Jmanriquerios ,

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

    Regards,

  • citdevpros Profile Picture
    61 on at

    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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard