Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

auto increment an IDNr (not the SharePoilit ID)

(0) ShareShare
ReportReport
Posted on by 247

Hello,

 

I have a column at my SharePoint Online list called IDNr and over there I would like to have a way to increment the number each time I create a new item with a powerapp flow if possible or any other way.

 

i want not to use the SharePOint ID nr as i delete some items and that will mess up the numbering.

 

thank you in advance.

 

 

  • Community Power Platform Member Profile Picture
    on at
    Re: auto increment an IDNr (not the SharePoilit ID)

    Hi boss 

    This solution works perfectly with auto increment in the list but how can i add a concate to it like KIH1, KIH 2 .... 

  • kouliscon Profile Picture
    247 on at
    Re: auto increment an IDNr (not the SharePoilit ID)

    hello @mdevaney 

     

    coming back with this, I tried to implemented at a new list which I already had data and the last "IDNr" value was 220

     

    when I went at the DEFAULT and I added the code: First(Sort(Invoices,IDNr, Descending)).IDNr + 1 then I noticed first at the powerapp forms the below:

     

    Incremental IDNr.png

    but also when I was creating an entry it was starting from value 100.

     

    any idea why?

     

    I also tried and is kind of working with the formula: Last(Invoices.IDNr).IDNr + 1 but that wont work when two users have open the view of the list and is not refreshed at the latest value..

     

    any suggestions?

  • kouliscon Profile Picture
    247 on at
    Re: auto increment an IDNr (not the SharePoilit ID)

    thank you @mdevaney  that worked great!!

  • Verified answer
    mdevaney Profile Picture
    29,987 Super User 2025 Season 1 on at
    Re: auto increment an IDNr (not the SharePoilit ID)

    @kouliscon 

    Let’s say you have a column called IDNr inside your list.

     

    Add a field for IDNr inside the form used to create new items.  Then put this code in the Default property.

     

    First(Sort(Your_List_Name, IDNR, Descending)).IDNr + 1

     

    Then set the Visible property of the field to false so no one can change it.  

    When the form is submitted the IDNr will increment +1

     

    ---
    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."

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard