Hello,
In my app, there is data that is created with a unique ID for each piece of equipment. I have it so that when you create a new equipment field, a new unique ID is attached to it. This is done by setting the ID datacard in my edit form to Last(Sort(MasterList,ID)).ID+1. So it is looking up the max value from the list, and then adding 1.
This works great! Except, in one scenario:
ID
1
2
3
4
If you delete ID #3, you are left with
ID
1
2
4
Which means the next time you create a piece of equipment, you get ID #5, and in the long run this causes issues for me.
I would like to have some sort of code that could find any "missing" values from my column of ID numbers, something that would return the number 3 if we're looking at my example from above.
And in the case of multiple missing numbers, would return only one value, the lowest one, so another example would be
ID
1
2
4
6
Both 3 and 5 are missing from the list above, but I would like to return 3 only, so that the lowest 'spot' gets filled in first.
Thank you!!