I wanna make it so that every time a person visits the page, they get a new ID. It can be the same person just wanna assign unique ID to represent a visit basically. What I wanna do is just start with a counter. So like the first visitor would have the ID 1. The second visitor would have the ID 2. Basically a unique ID that is just really a visitor counter. How would I achieve this?
You could set the ID to Current date/time:extract UNIX timestamp (ms)
. This will throw the number of milliseconds since 01/01/1970.
Since time doesn’t stop and certainly doesn’t go backward, you’re sure to get a unique ID every time
The only reliable way to do this would be to store the ID in a data type and increment it everytime someone visits the page. Although I am a big fan of keeping database access to the minimum, this could be your only option.
Create a data type called “system” or something similar and create a field to hold the ID value. Make sure the type is number. You would need just one entry.
Your workflow action for the page would be:
When page is loaded >> Do a search for…first item >> increment and update the counter.
I tried this out but it dont update am I doing it wrong?
made a data type for it and filled with one value that is a number…
when page is loaded im storing it in a field in my current user and then increment it.

However, the number doesn’t seem to change when I refresh the page?
I recreated the solution with just one workflow action when the page is loaded, and it works. See attached.
Maybe you should check your Privacy settings to see if the current user can update the data type. Hope this helps.
nvm it works but it seems to always be off by one number (like it completes setting my variable to the value before changing it in the database even though it was the first step).
This topic was automatically closed after 70 days. New replies are no longer allowed.