2

How do I generate a sequence of random characters. I want to send an email with a username and temporary RANDOMLY GENERATED password of about 6 characters in Mendix

asked

Tshipe Simon Mokhele

5 answers

6

Or just download the Random data generator from the appstore.

answered

Sebastiaan van den Broek

1

Hmm this would require some work especially if you want to reuse it or if you want it to contain special characters. I would suggest you build a microflow that picks a substring of some input based on the random outcome. e.g. provide input 'abcdeABCDE' and length 5, to the following microflow.

answered

Pieter van de Braak

0

Like this, where the "if then else" statement should continue to 26 for the letter z. Or 52 if you want to include capital letters or 62 if you want to include numbers, etcetera.

answered

Jaap Pulleman

0

Community Commons version 8.3.1. did it for me.

answered

Virginia Hernandez

-2

Or calculate a variable with expression below (untested). Use the modulo divider for de number of different character values Use the modulo result to match with character

if ( round( (random()* 1000) + (random()* 100) + (random()* 10) ) : 3.856 ) mod 26 = 0 then 'A' else if ( round( (random()* 1000) + (random()* 100) + (random()* 10) ) : 3.856 ) mod 26 = 1 then 'B' else if ( round( (random()* 1000) + (random()* 100) + (random()* 10) ) : 3.856 ) mod 26 = 2 then 'C'

else 'etc.., etc..'

answered

RenĂ© Smit