Only Saves Employee Data If it matches with Employee ID

Hi All,

I have made a beautiful app, where I collect time card for my employees everyday. However, I want to achieve this following. After my employees fill in the form they need to put their employee ID at the end to save the form, if their employee id is incorrect it will ask them to put correct id. Their employee id is given in the spreadsheet from where it will match and validate. Below is how my form looks like. Thanks legends, please help!

Something like [Employee ID]=LOOKUP(USEREMAIL(),Employees,Email,ID).

But why the employee needs to write it? If you have Employees table, why don’t you read who the user is with the USEREMAIL()?

1 Like

Hi Mate,

Thanks for your response.

why the employee needs to write it? - They need to key in their employee id to ensure they are not messing up with other employees timecard.

If you have Employees table, why don’t you read who the user is with the USEREMAIL()? - - This is where i am stuck, if don’t know what to do.

[Employee ID]=LOOKUP(USEREMAIL(), Employees, Email, ID) - I have tried this but no luck.

If can do vice versa then its also fine. Your advice will be much appreciated.

If you add the expression USEREMAIL() to your column’s initial value and hide that column, the app reads who the user is and there is no need then to ask any code.

Hi Mate,

So previously I have done this made the employee id a dependent dropdown and hide it, but what happened they are purposely selecting other employees name and submitting wrong timecard. So , what i am trying to do is. Employee will select their name and it will ask for their Employee ID against their name, if the id is wrong they can’t save the form, if it is correct the form will be saved. For example : I made a login - where employee name is the username and the password is their employee ID. If the employee id is correct they can sign in to the system else denied. However I have tried to put the similar expression in this form but it does not work. Please advise thanks legend. :slightly_smiling_face:

Do all of your employees have the AppSheet license?

Nah they all does not have.

All sorted, thanks mate. They have discussed it here!

https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/valid-if/m-p/510887#M198988