Tracking a number for non-signed in Users

Hey all – first off, Glide is changing the game for me. So yay.

Here is a game I created: Turf.

In this game players get 5 chances to guess the location. This works perfect for signed in users but for non-signed in users the guess count starts at 0 and goes to negative infinity.

Any idea on how to solve this?

I have “guesses_left” in a user-owned column that not part of the users table.

Thanks!

Here are some screen shot showing “guesses remaining” for a signed in vs not signed in user.

h

Can you show how you are calculating this?
It should work for visitors as long as there are no page refreshes.

I have a User Column called Guesses Left that I entered 5 into. When users click submit the number is subtracted by 1. Each day the Guesses Let column is reset to 5.

My guess is that I need a different way to set the initial value for Guesses Left other than me inputting it at the start…?

That’s only going to be 5 for you viewing it in the builder.
For anyone else viewing your App it will always be empty, which is why you get a negative number when you subtract from it.

What you could do is add a “Start” button and use that to set the initial value.

However, if you’re trying to track the value per user across multiple days, then it’s still not going to work unless your visitors leave the page open permanently and never refresh it. Because every time they refresh, or close the page and open it again all user specific values will be empty - as if they are a completely new user. Which effectively they are.

Just so I’m clear – are you saying that user-specific columns clear for signed-in users whenever they refresh?

Also, could I just have everyone start at 0 then track when they get to -5, thus removing the need to set at 5 from the start?

No, not for signed in users. For signed in users they are attached to their profile, so will be persistent - across multiple sessions and multiple devices.

But for visitors - “users” that never sign in, the values only last for a single session, and reloading/refreshing the App causes them to be cleared.

Yes, you could do that. But you’re still going to have a challenge tracking the value for visitors across multiple sessions.

Got it.

I was able to figure out a solution using absolute value (image attached).

As for tracking multiple session for non-signed in users – it’s not a priority so all good there. Thank you for your help!

1 Like