Documentation Bug | Manually Generating UNIQUEID() Key Values

In the following article: 

Manually Generating UNIQUEID() Key Values | AppSheet Help Center 

The formula for generating unique IDs won't work in Google Sheets or Excel. Please replace the commas "," with semicolons ";".

=DEC2HEX( RANDBETWEEN(0, 4294967295), 8 )

should be:

 

=DEC2HEX( RANDBETWEEN(0; 4294967295); ‌8 )

 

Update: I was advised that this depends on the locale of the sheet. While semicolons are always accepted in formulas, commas are accepted only with US and similar locales. So instead of being a bug report, please treat this as suggestion to add a note about the locale when working with sheet formulas. 

 

 

 

 

Solved Solved
2 4 562
1 ACCEPTED SOLUTION

I think we discuss this on another post. You should mark this as solved.

The summary: It depends on locale

View solution in original post

4 REPLIES 4

I think we discuss this on another post. You should mark this as solved.

The summary: It depends on locale

I don't think this formula should be used in any case as it can generate the scientific notation type of number that has caused many problems for myself and others when attempting to create keys on many thousands of records in a sheet.

I now use this 

=MID("abcdefghijklmnopqrstuvwxyz",INT(RANDBETWEEN(1,26)),1)&DEC2HEX(RANDBETWEEN(0, 4294967295),8)

 

,  😎

It adds a random alphabetic character before the hex number to stop sheets from treating the output as a number and removes the worry of generating a number with scientific notation.

 

I mark my key columns as text manually so that the worksheet doesn't have to guess the data type, I suggest you the same

Well after messing about with the above response and trying to remove the emoji that I did not actually insert, I gave up.

This community platform is broken for use on mobile phones!