crabtreed Posted February 29, 2024 Posted February 29, 2024 Without a field being supplied what would be a good way to generate a variable random number field to put in a QR code and as a text human readable value for use on a template. The value needs to stay the same per record, so that the QR code and Field value stay the same. Quote
Dan Korn Posted March 5, 2024 Posted March 5, 2024 You can do something like in OnRecordStart to generate a random number between 1 and 10: randomNumber = Int(Math.random() * 10) + 1; Change the 10 to whatever upper range you want. Then you can use that randomNumber variable (or whatever you want to call it) in other rules for barcodes, or just return it as text. You could also do something like this in OnRecordStart to make that JavaScript variable accessible as a text variable, which you can then use in the Text Editor directly without having to make another rule: FusionPro.Composition.AddVariable("randomNumber", randomNumber); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.