UNIQUEID - Changing when row updated

I am currently using an app formula UNIQUEID to create an ID for each new row added. There are instances where a user may go back and edit a column (or multiple) and I would like the UNIQUEID to be unchanged but each edit is regenerating the UNIQUEID. As it is an app formula, the methods I have tried are not working.
Is there a resolution for this?
Ideally I would like a sequential number CC0001, CC0002, CC0003 etc but as we have many users, I do not want to risk duplicate IDโ€™s.
Thank you.

Solved Solved
0 9 1,103
1 ACCEPTED SOLUTION

Hi @Chloe_Walker Is your formula an โ€œInitial Valueโ€?

View solution in original post

9 REPLIES 9

Hi @Chloe_Walker Is your formula an โ€œInitial Valueโ€?

Steve
Platinum 4
Platinum 4

As @Lynn hinted, your UNIQUEID() expression should be in the columnโ€™s initial value, not in its app formula.

Steve and Lynn nailed it on the head to move that โ€˜Formulaโ€™ expression into the โ€˜Initial Valueโ€™ field.

But regarding the sequential number portion:
For the Key Column I 100% suggest you used randomized strings (UNIQUEID()).

However if the user are more used to seeing IDs like CC0012 you could have another field that runs an initial value to create those sorts of codes that are visible to the user, but still use UNIQUEID() as the Key Column the user wouldnโ€™t see.

This would insure the security and consistency of UNIQUEID() but also would allow the easy to adoptable UX/UI the users would be familiar with. Also keeping you from losing sleep in fear of people deleting rows messing up the Key Value.

Hi QREW_Cam,

I am creating a lead app to enter and view regular company leads entered by all employees. When creating users and leads I need to generate an ID to use for reference for other tables and the unique ID is generating and saving perfectly with UNIQUEID() formula.

But the problem is every time anyone edit a user or lead, again its generating another ID and save to the sheet. Same happening with TODAY(). I just wanted to show the user or lead created date but every time when edit, its saving the today date to the sheet.

Is there any way I can save User ID and TODAY date when creating the record and just show it without update when anyone edit the other fields of lead/ User?

Sounds like you are pushing expression into App formula instead of initial value. When the new row is added, then app formula will return the values and save to the source. Then the same row is updated, the expression is rerun and keep the latest value.
Just move the expression to initial value and set the same fields editable set up to โ€œFALSEโ€.
Anyone can update that field by doing so.

Sorry, you canโ€™t

Thank you @Lynn, @Steve & @QREW_Cam that has solved my problem. The one thing I did not try.

Regarding the CC*** numbering, the user can live without that for now, so the UNIQUEID() will work just fine.

Sweet!

Didnโ€™t want to leave that portion unanswered because I know we often run into some cases where we have to add hints of legacy solutions into AppSheet ones to connect dots for them!

@tsuji_koichi

I tried the way you replied and it worked like a charm. Resolve the issue at once. Thx alot

Top Labels in this Space