I have a table (and a view) called "Sign In" ...

I have a table (and a view) called “Sign In” for user sign-in on a published-app-to-be. The computed key for the table is Date:Email.

I’d like to test whether a user is already signed in so I can display a message. [Sign-in also requires a PIN and a member number for authentication; yes, I know that’s not 100% secure, but it’s secure enough in our context]

Right now if I’m already signed in and try to sign in again I get the message in the screenshot. How do I test for that state?

0 12 371
12 REPLIES 12

Can you clarify your current Sign-in process a little bit? I am guessing once a user signs in, a record is saved in sign-in table, and the above message is the automatic error AppSheet returned based on the computed key which you are trying to avoid somehow; am I right?

@RezaRaoofi exactly :=)

@RezaRaoofi couldn’t have done it without your help :=) Thank you!

You are welcome Sir!

Clarification: yes, I’d like to avoid the error message but also post a message of my own to let users know they’re already signed in. I guess the simplest solution would be to allow me to localize that error message if possible. (change it to: “you are already signed in” or some such)

Then in the same sign-in page you should be able to have a lookup(…) function to checks for existing signed in users and if it exists it could show a text on screen using for example a Show column.

Or you could use the new Error_Message_If_Invalid for the sign-in name; if the sign-in name already exists it won’t be valid and you will also display a custom message.

@RezaRaoofi I’m using the Error_Message_If_Invalid to verify that they’ve entered a well-formed email, actually. The message doesn’t appear if the email is well-formed, even that email already exists. It appears later, when the user saves the form, which must be when the system checks for duplicates.

I can live with the current wording, but it sure would be nice if I could localize it…

+Charlie Wells Well, if you are already using Error_Message_If_Invalid, then you just need to change the condition inside Valid_if to also check for existing email in Sign-in table, so it would be invalid if exists, and user will see that custom error message.

If you do not catch it by Valid_if condition, then AppSheet will check for duplicate Key only upon save.

@RezaRaoofi thanks! so now I get this…

@RezaRaoofi … or this:

+Charlie Wells Looks nice! You made it man!

Top Labels in this Space