is there a way to use flow based solution on sharepoint list where a new entry in the list can generate a unique case reference number which will get incremented by one, but still with some consistency checks like, if an entry is deleted, the numbering is not reused?
The easiest way to do that is to sort the list using ID in descending order and take the first record. That will give you the last ID used. Add 1 to that and incorporate that number when creating the new record and you'll have a unique reference number where numbers are not reused. The only concern would be if two records are created at essentially the same time after reading the highest ID. You could then have two records. But reading the highest ID just before creating the record would minimize the time gap where that could happen so unless the system is heavily used you would be OK.
Thanks - I will test that. not much concerned about two users hitting submit same time as i don't expect that kind of traffic. is there a way to reset the ID to 1 after all tests?
You can only reset the ID on the SharePoint list by deleting and recreating the list.
Use a "When Item is Created" trigger.
Add your list info.
Then for your reference number field, insert this function:
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!