i want to generate 6 digit from randomize numbers and assign to local variable in out system without using any forge how i can ?
Hello, @moheman aldulimy
You can refer this thread also: https://www.outsystems.com/forums/discussion/86671/how-to-generate-random-alphanumeric-numbers-and-store-then-in-database/#Post366438
you want to generate a random string of length of your choice in JavaScript. In that case, you can add a JavaScript node with the following code and and an input parameter TextLengthnof type integer and an output parameter of type text called Uid to it.
function getRandomString(length) {
var s = '';
do { s += Math.random().toString(36).substr(2); } while (s.length < length);
s = s.substr(0, length);
return s;
}
$parameters.Uid = getRandomString($parameters.TextLength);
hope, this will helps you.
Thanks & Regards
-- Priya Jhode