I have a field on a document. When a new document is created this field must have a random name starting with a “M” and in total 8 characters (letters and numbers).
Something like “M9UI0KWL” for instance.
Can this be done with Formula language? What should the code look like?
Subject: generating a random name in @Formula language
Random? Well, sure, but the formula would need to loop and pick characters from a list. There’s a quicker way, though, if you don’t have any more complicated rules than “8 characters starting with ‘M’”:
The first character you get from the @Right… will be derived from the user name (probably the last character of the last name), and the rest will be a base-32 time stamp that will look random. The characters “0”, “O”, “1” and “I” will not appear, since they are visually indistinguishable in some fonts (and difficult to distinguish in most), but other than that there will be no apparent pattern.