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 / [Urgent]Auto ID genera...
Power Apps
Answered

[Urgent]Auto ID generation item created Editform SharePoint list also attached steps kindly help

(0) ShareShare
ReportReport
Posted on by 2,249

I created below steps when I'm trying to submit item  in PowerApps form for SharePoint list as data source but issue is ID is stopped working intermittently and suddenly its working, inconsistent behavior.no clue why this is stopped working.

 

Kindly help 

 

Step 1: Set the below formula in datacard default value for the field

 

Veblitz_0-1669659862882.png

 

Step 2: In the edit form success property i set the below formula

 

Veblitz_1-1669660117579.png

 

Auto created ID is only getting created inconsistently when list item is deleted and if you create form newly also sometimes its skipping for some record and getting created suddenly,no clue of this behavior also this is number field in my SharePoint list

 

Veblitz_0-1669660675098.png

 

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    Hi @Veblitz ,

    I will outline some fundamentals (you probably already know them but may jog some thoughts).

    • When you save your Form, it will write a new ID number (to the new record) and then set your Variable to the next number.
    • This number is then used as the Default of a Text Box as a Text value in what I assume is another new record.
    • Unless this is subsequently saved on that form, it will of course disappear and can never be generated again (the new record can only be saved once).

    So one question (if I am interpreting your process correctly) is why not simply Patch it OnSuccess

    Patch(
     SPListName,
     {ID: Self.LastSubmit.ID},
     {StaffRosterID: Text(Self.LastSubmit.ID,"00000")}
    )

     

    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.

    Visit my blog Practical Power Apps

  • Veblitz Profile Picture
    2,249 on at

    Thanks for the inputs. Yes correct process.

     

    Unfortunately, I am facing below formula returns error that it has invalid arguments StaffRosterID does not match the expected number ,found type error.

     

    Note: StaffRoster ID is number column in my SharePoint list

     

    Veblitz_0-1669701517073.png

     

  • Verified answer
    WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    @Veblitz ,

    Looking at this again, StaffRosterID is a number, so all you need to do is not use Text() and have the expected input of the text box as a number, however forgetting all of that OnSuccess

    Patch(
     SPListName,
     {ID: Self.LastSubmit.ID},
     {StaffRosterID: Self.LastSubmit.ID}
    )

     

    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.

    Visit my blog Practical Power Apps

     

  • Veblitz Profile Picture
    2,249 on at

    Much appreciated

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard