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 Platform Community / Forums / Power Apps / Auto create running nu...
Power Apps
Answered

Auto create running number with increment +1

(0) ShareShare
ReportReport
Posted on by 118

Hi,

I have a Power App which is connected to a Sharepoint list. For my use case I created a form which includes a number (" field Title") starting from 1 and after submitting the form the number should automatically go up by increment +1.

 

Currently I use the following formula as "Default" in the DataCardValue for "Title":

 

First(Sort('SP List Name'; Title; SortOrder.Descending)).Title+1

 

This works fine until I reach the number 10. Somehow after submitting the form for number 10 the increment +1 is not applied and 11 does not appear instead number 10 is still listed even though it has been saved and submitted. Whenever I click on the Title in the formula, it says 9, even though the item number 10 has been saved correctly to the SP list????

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at

    Hi @DirkKoch ,

    Title is generally a Text column, you need to change it into a number

    First(
     Sort(
     AddColumns(
     'SP List Name'; 
     "IDVal";
     Value(Title)
     );
     IDVal;
     SortOrder.Descending
     )
    ).IDVal + 1

     

    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

  • DirkKoch Profile Picture
    118 on at

    @WarrenBelz Thanks for the quick reply. 
    The counter does now show the correct number but when I submit the form under the new number (e.g. 11), I get an error saying "the list element could not be added or updated because duplicate value were found in the following fields of the list: [Title]". But in the Sharepoint list there is no item with Title value 11, it ends with 10. Also a refresh of the SP list within Power Apps does not solve the issue???

  • WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at

    @DirkKoch ,

    What was the original name of this column (I was assuming Title) - can you please post a screen shot of the field in your SharePoint List Settings as the details you have posted presently make no logical sense to me.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard