Hello,
Is it possible that the uniqueid() formula only generates letters?
Thank you
Solved! Go to Solution.
@WillowMobileSys wrote:
Assuming English alphabet, the idea to generate a single random letter is to use an expression like this:
INDEX({a,b,c,d,e,f,g,h,i,j,k,l,m,"n",o,p,q,r,s,"t",u,v,w,x,y,z}, RANDBETWEEN(1, 26))
Or:
MID("abcdefghijklmnopqrstuvwxyz", RANDBETWEEN(1, 26), 1)
No, sorry. It returns hexadecimal results with no option for only letters. UNIQUEID()
You could create your own random generator with the RANDBETWEEN() and INDEX() functions.
Do you have idea with this?
Assuming English alphabet, the idea to generate a single random letter is to use an expression like this:
INDEX({a,b,c,d,e,f,g,h,i,j,k,l,m,"n",o,p,q,r,s,"t",u,v,w,x,y,z}, RANDBETWEEN(1, 26))
If you wanted to create, say, an 8 character randomly generated character string then you could use this expression:
CONCATENATE(
LOWER(INDEX({a,b,c,d,e,f,g,h,i,j,k,l,m,"n",o,p,q,r,s,"t",u,v,w,x,y,z}, RANDBETWEEN(1, 26))),
LOWER(INDEX({a,b,c,d,e,f,g,h,i,j,k,l,m,"n",o,p,q,r,s,"t",u,v,w,x,y,z}, RANDBETWEEN(1, 26))),
LOWER(INDEX({a,b,c,d,e,f,g,h,i,j,k,l,m,"n",o,p,q,r,s,"t",u,v,w,x,y,z}, RANDBETWEEN(1, 26))),
LOWER(INDEX({a,b,c,d,e,f,g,h,i,j,k,l,m,"n",o,p,q,r,s,"t",u,v,w,x,y,z}, RANDBETWEEN(1, 26))),
LOWER(INDEX({a,b,c,d,e,f,g,h,i,j,k,l,m,"n",o,p,q,r,s,"t",u,v,w,x,y,z}, RANDBETWEEN(1, 26))),
LOWER(INDEX({a,b,c,d,e,f,g,h,i,j,k,l,m,"n",o,p,q,r,s,"t",u,v,w,x,y,z}, RANDBETWEEN(1, 26))),
LOWER(INDEX({a,b,c,d,e,f,g,h,i,j,k,l,m,"n",o,p,q,r,s,"t",u,v,w,x,y,z}, RANDBETWEEN(1, 26))),
)
This obviously is limited by the expression you create.
However, if you wanted to specify the creation of a random character string of any length, you could build a looping construct using actions to do it.
Refer to this article for more on how to create the looping ability:
Thank you @WillowMobileSys
@WillowMobileSys wrote:
Assuming English alphabet, the idea to generate a single random letter is to use an expression like this:
INDEX({a,b,c,d,e,f,g,h,i,j,k,l,m,"n",o,p,q,r,s,"t",u,v,w,x,y,z}, RANDBETWEEN(1, 26))
Or:
MID("abcdefghijklmnopqrstuvwxyz", RANDBETWEEN(1, 26), 1)
Perfect! Thank you sir @Steve
User | Count |
---|---|
44 | |
31 | |
29 | |
14 | |
14 |