cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pwrappr01
Helper V
Helper V

How can I create row numbers in a collection?

I have a collection I am creating from a SharePoint list. I would like to add row numbers to it so I can reference each item in the collection individually. Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@pwrappr1
Every SharePoint list includes an ID field by default. It is a unique row number you can reference individually. Does that work for you?

If you want to make a new column with a unique row number I suggest you check out this blog post by forum user Tim Leung: http://powerappsguide.com/blog/post/generating-row-numbers

Note: you may have to unhide the column to see it in your SharePoint List webpage but PowerApps will already be pulling this field in.

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
mdevaney
Super User III
Super User III

@pwrappr1
Every SharePoint list includes an ID field by default. It is a unique row number you can reference individually. Does that work for you?

If you want to make a new column with a unique row number I suggest you check out this blog post by forum user Tim Leung: http://powerappsguide.com/blog/post/generating-row-numbers

Note: you may have to unhide the column to see it in your SharePoint List webpage but PowerApps will already be pulling this field in.

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

datamaster
Resolver II
Resolver II

Hi @pwrappr01  I have a blog post on https://officepoweruser.com/how-to-make-a-gallery-control-automatically-scroll-in-powerapps/ that creates a row number. I think this will help you!

 

 

------------------------------------------------------------------------------OfficePowerUser.com------------------------------------------------------------------------ 
If this post helps answer your question, please click on “Accept as Solution” to help other members. If you thought this post was helpful, please give it a Thumbs Up. 

@mdevaney  and @datamaster , thank you both for responding. What worked for me was the link @mdevaney provided. Really helpful.

This is a great solution, but how can you sort the new collection? I tried using the Sort(Gallery1, Points, Descending), but it's not working. I'm trying to make this work for our leaderboard solution. I hope someone can revisit this and help me out. Thank you!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,343)