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 / How auto generate ID
Power Apps
Unanswered

How auto generate ID

(0) ShareShare
ReportReport
Posted on by 825

Hi all experts here,  do you have any idea how can you create the Autogenerated IDs? as I'm new to this I need help from you people. 

such that when the record is created has a unique ID and if deleted should be reset for a new one just as we do it in SQL and EXCEL when the record is created, updated and deleted? 

 

 For example: 

 

SPList Name is CashApproval 

 

columns: newly generated after user input 

ID Employee NameStatus 
1Tapesh Approved 
2Sam Pending 
3Fiona Rejected 

 

 

columns: updated  after user edited form 

ID Employee NameStatus 
1Tapesh Approved 
2FionaPending 
3SamRejected 

 

columns:  Deleted and updated after the entry deleted 

ID Employee NameStatus 
1Tapesh Approved 
2SamRejected 
   

 

Can this be possible by power apps ID filed/DataCard as the user sends a request form?

 

Any help is Appreciated or even Idea for getting this thing done. 

@v-xida-msft @mdevaney @Eric6 @erik209 @WarrenBelz @eka24 

#AutogenerateID #ID #SharepointList 

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

    Hi @Tapesh ,

    I assume this is SharePoint as you have mentioned SPListName.

    So firstly, SharePoint has its own built-in numeric identifier called ID. It needs no management and it automatically generated when a new record is created.

    If you want to maintain another separate number, there is a process for that too - just let me know.

     

    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.

     

     

     

  • Verified answer
    eka24 Profile Picture
    20,923 on at
    watch the auto ID from Shane Young
    https://youtu.be/plKw_xfVfwY
  • Tapesh Profile Picture
    825 on at

    HI @WarrenBelz 

    @eka24 

    Yes, I would like to know more about this how to generate the Id automatically.

     

    Also as you said the sharepoint list is automatically updated, do you know when we use the same ID filed of sharepoint list to update the custome Id Filed, why does it takes the time to show on sharepoint list? also the other reason behind asking you this question is the sharepoint list not been updated as the Record is created or deleted.  Here is the Screen Shot of the the Page form my sharepoint list after the record is deleted. 

    Display.png

     

    Please!

     

    Thanks 

  • eka24 Profile Picture
    20,923 on at
    Check out this
    https://youtu.be/b91RBJ42T5w
  • Verified answer
    WarrenBelz Profile Picture
    153,030 Most Valuable Professional on at

    Hi @Tapesh ,

    To cover your questions

    You did not say how you were updating your custom ID field, but generally a refresh of the data source should see it.

    Your point on deleting records is valid - SharePoint does not re-order the list.

    However if you want to keep another custom number list away from the ID, then try this - I will call the control (it can be a hidden text box or even a label in a custom card) CustomNo  - I will cover the Text box scenario. The Default of this would be (I have used your 'Petty Cash' list):

    First(
     Sort(
     'Petty Cash',
     CustomNo,
     Descending
     )
    )
    .CustomNo + 1

    This would add 1 to the highest number in the existing list and put the number in the text box for writing to SharePoint.

     

    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.

  • Verified answer
    rebeccas Profile Picture
    2,591 on at

    I almost always use the ID that is generated by a SharePoint list in my apps. The SharePoint list won't default to show it but you can change the settings to view it if you would like. I often have when my form is submitted as the OnSuccess I do a Patch that puts that ID field in my Title column because there are a few things that works good for. 

     

    I came from Access so it is just works good for me like that and when I have multiple list that need a tie point that is what I refer to. List two will have a column that is "ParentID" that is a number column and it stores that ID from list one. You will find that useful on the Flow side also because if you have the ID of an item easy to get to like that you can use the 'Get item' instead of 'Get items', which works much better!

     

    Good luck!

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

    Hi @rebeccas ,

    I too have an Access background.

    Not wanting to get off the subject of this thread too much, but I use the ID and a cross-reference as you do and we actually use Access just as much as PowerApps for bulk editing and Excel reporting directly from SharePoint.

  • rebeccas Profile Picture
    2,591 on at

    I still use Access too. I mainly use it for doing queries to monitor existing apps and watch for problems when they first launch (duplicates, in one place and not another and should be both, etc.). 

     

    I have one now that I am working on that will be the Active data in PowerApps but the archived data they can pull from Access.

     

    Because that is where I started, my PowerApps tend to layout (on the data set-up) similar to how I would have in Access...that is hard to change the mindset on!

  • ArtU Profile Picture
    27 on at

    Hi

     

    the 'First' function has delegation limit. Do you have other formula instead.

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

    @ArtU ,

    Yes, but sort does not - so you are only accessing one record, which is (well) within Delegation.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard