Post is related to this SO thread
According to the Utilities.getUuid Google Scripts docs:
Get a UUID as a string (equivalent to using the java.util.UUID.randomUUID()
Looking at the java.util.UUID.randomUUID() docs:
The variant field contains a value which identifies the layout of the UUID. The bit layout described above is valid only for a UUID with a variant value of 2, which indicates the Leach-Salz variant.
Does variant value of 2
means UUIDv2
?
Assuming Utilities.getUuid
generates s UUIDv2
and it doesn't pass UUIDv4
validation:
My project needs to generate UUIDv4 in JS code. Also, there's a restriction on _ids: they have to be UUIDv4
(it is non-negotiable, existing db etc).
Is it possible to generate a UUID V4 via the GS Utilities
interface?
Or - is my best option to copy & call JS code which generates a UUIDv4 instead?