
Announcements
Hello,
I am designing an app where staff create a record on their devices. They can choose to save the record after a certain amount of data has been entered or submit the record completely.
Upon save or submit, I need a unique reference number to be created in the format of 22/****/24 (the 24 will need to change depending on the year etc).
As staff can work in areas on no cellular signal, I need each device to 'bank' a number of reference numbers, say 5, to prevent duplication. The banked references need to be automatically updated each time they have cellular or wifi signal.
Hi @Keiron1850
Because your staff may have no internet connection, we can create the unique reference number once the staff's device is online again and gets save in the data source. Are you using SharePoint or Dataverse or another data source?
To create a reference number you can save an easy format to sort in your data source: a good format is YYYYMMDD-0000 because it easily sorts alphabetically. All you have to do now is get the serial number (get last 4 numbers) and increment it if the previous reference number if it is the same year, or reset it if it is a different year. You can change the format into 22/****/24 when you display it in the app.
You can follow this tutorial for your requirements or ask me if you have any more questions.
Power Apps – How to do reference numbers with dates and serial number