I am looking for some help removing the ‘0.’ from the screenshot please. So it leaves me with just a plain 4 digit number each time. I have tried splitting the text but cannot get it to work as planned. I also tried using the Row ID to generate a random no too, but couldn’t get the result I was looking for.
Perhaps there is a better way for Glide to produce me a random 4 digit code without using precision to 4 decimal places to give me the code in the random no column? Any ideas please?
Thanks all for the feedback. If you were to generate a four or six digit random code how would you go about doing this then? It sounds like the general feedback is that doing it the way I proposed is not ideal? Happy for any better approaches, or is JS the most sensible option here?
Generating a random 4 or 6 digit code is trivial - there are umpteen different ways that can be done.
The critical question is - does it need to be unique?
If it does, then you are limited to 9999 and 999999 codes respectively, and it gets somewhat more complicated, because you need to keep track of the codes that have been assigned.
I suppose it would have to be unique and with only 30 odd employees this will be fine. Staff will clock in and out on a Glide screen on a clock in/out module, but the system needs to know which 4 or 6 digit code relates to which employee when they clock in/out.
If it is easier, I can simply generate a four digit random code myself.
What is the actual purpose of the code?
I assume that your Staff will sign into the App?
If they are signed in, then you have already identified who they are and there should be no reason to use any codes
They will not be signed into the app, they will get to work and click on an open glide screen (open to all) with the 4 or 6 code to register their clock in or out. The owner doesn’t want everyone to sign into glide individually or out of glide (I know, obvious solution!).
They would like a simple code to follow their existing operations flow. Hopefully this is enough background.
If it’s just 30 odd users, I would be inclined to just manually allocate the codes.
You should be aware though that this is not a very secure solution. The full list of codes and associated user mappings will be loaded onto every user device, and discoverable by anyone with sufficient skills and motivation - including anyone in the world that happens to learn the App URL.