Contents
10-25-2018 02:24 AM If you can consider using a SubmitForm function instead of a Patch, you can use the LastSubmit property of a form. EditForm1.LastSubmit.ID will return the ID of item you’ve just created. 10-25-2018 04:16 AM
How to get the last inserted ID in PHP?
If we perform an INSERT or UPDATE on a table with an AUTO_INCREMENT field, we can get the ID of the last inserted/updated record immediately. The following examples are equal to the examples from the previous page ( PHP Insert Data Into MySQL ), except that we have added one single line of code to retrieve the ID of the last inserted record.
The warning is because First () can’t be delegated. But since you are sorting the list in Descending order, which can be delegated, you are assured that the highest Id is the First item in the list. So it won’t matter that First () isn’t delegable in this case. You only need the first item no matter how many there are.
Is the highest ID in a list delegable?
But since you are sorting the list in Descending order, which can be delegated, you are assured that the highest Id is the First item in the list. So it won’t matter that First () isn’t delegable in this case.
How to get the last submitted form id?
If you want to get the ID of the last submitted form within a New form of your app, you could consider take a try to store the last submitted form as a collection within your app, and then you could reference the Editform.LastSubmit property value through the collection.
How to get last record ID from table?
Any technique of asking for the maximum value / top 1 suffers a race condition where 2 people adding at the same time, would then get the same ID back when they looked for the highest ID. But the first one will be more efficient because no index scan is needed (if you have index on Id column).
How to get the last inserted ID in MySQL?
Get ID of The Last Inserted Record. If we perform an INSERT or UPDATE on a table with an AUTO_INCREMENT field, we can get the ID of the last inserted/updated record immediately. In the table “MyGuests”, the “id” column is an AUTO_INCREMENT field: CREATE TABLE MyGuests (.