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

Gallery Row Number

(0) ShareShare
ReportReport
Posted on by 6

How can I add a row number to each row in a gallery?

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @gregbahr 

    Check out this article.  It has exactly how to do this. http://powerappsguide.com/blog/post/generating-row-numbers 

  • gregbahr Profile Picture
    6 on at

    The problem with this solution is it counts the number of records in the collection. I have a gallery that displays a subset of the collection, and I want to display a row number for each row in the gallery.

  • Verified answer
    v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @gregbahr ,

     

    I cannot think of a smarter way but the below one:

    1. Create a new collection with the ID field like:

    ClearCollect(C2,{ID:1},{ID:2},{ID:3})

    2. Add this column to the collection that is the data source of your gallery. 

     

    AddColumns(C1,"ID",C2.ID)

     

    Regards,

    Mona

     

  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    im trying your method but i dont know why the id column in c1 is not creating and if creating its not callable or showing... can you kindly help me with it?

    image.png
    image.png
    image.png

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard