Creating a Random fixed length ID

Hi there

Does anyone know how I can create a random 8 digital number that can then be used as an ID.

I want to be able to create a fixed length ID to associate with customer records. I understand that equation would be the way to go, but I am not sure how you can be sure that it will create somthing unique as there is no possibility to set this on the equation field.

Therefore a random number could not be unique when copied and set to the ID of the table record.

Hope that makes sense to knackers.

Knack’s got an explainer on a solution for this in the Builder Guide: How to Set a Random ID

Looks like it uses text formula, but there is also a number equation:

Get a random number between two values
random(1,42) = 36.238172

combine that with floor, and you’ll have your number, but then use the conditional rule to copy it to the number field when blank (like in Knack instructions)

So I got this down good. but the problem I have is that when the value is updated from a form the Random ID is not generated. When the value is updated from the knack builder it does.

In other words, if the field is blank in the knack data table view and I save it, it will assign the random ID to the text fied. When a new records is added to the table from a form, it does not creat the random ID