Freezing an attribute containing randbetween formula

Hi, Iam Trying to create Unique Ids for the Components. I Have generated Codes using RandBetween formula. At certain stage i dont want DC to make new random numbers and to freeze it at a stage. How to do the same. Is this possible in DC. Any Ways?

you need a condition to switch the rand() off, like a drop down, value, position, size, attribute, onclick
then the random value is frozen using the current formula (if using metric values then convert using 2.54 as current formula returns text and inches.

conditional random change.skp (19.6 KB)

Hi, It worked . Thanks