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 / create a consecutive n...
Power Apps
Unanswered

create a consecutive number

(0) ShareShare
ReportReport
Posted on by 212
Hi, I have a question, I have created an app for 5s methods. I want to take a photo of a tool with the app and upload it to sharepoint. The problem is, can you automatically create a consecutive number from 1 to ??? and enter it in sharepoint? so i start the app there should then automatically be e.g. 17 if there are already 16 entries in the sharepoint then you know ah okay this is the 17th entry then when i upload it. I hope I was able to explain it.
Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,603 Super User 2025 Season 2 on at

    Hi @Adinator

     

    All SharePoint lists already have a hidden but accessible Id column that generates a sequential number. It can be unhidden in SharePoint. Ref. https://sharepointmaven.com/how-to-add-a-unique-identifier-to-a-sharepoint-list-or-library/

     

    Solution: https://powerusers.microsoft.com/t5/Building-Power-Apps/how-to-set-Automatic-sequence-number-in-sharepoint-List-whenever/td-p/523104

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Lyessdt18 Profile Picture
    14 on at

    You can use this formula in On select property of a Power Apps control  :

    Patch(SharePointTableName, Defaults(SharepointTableName),{IDColumnName: If(IsEmpty(SharepointTableName),1,CountRows(SharepointTableName) + 1)})

     

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @Adinator ,

    You also need to allow for someone deleting a record, so you cannot simply count the Rows - the value you are looking for is

    First(
     Sort(
     SPListName,
     ID,
     SortOrder.Descending
     )
    ).ID + 1

    You can add this to the Default of a card hidden on a Form (I will use the field name Counter here)

    If(
     YourFormName.Mode = FormMode.New,
     First(
     Sort(
     SPListName,
     ID,
     SortOrder.Descending
     )
     ).ID + 1,
     ThisItem.Counter
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard