The idea is it automatically populates the Employee Name field, and the user just hits Save.
The problem is it’s not pulling the user’s name, it’s pulling mine. I suspect this is because [_THISROW] doesn’t exist yet, the record of the clock-in hasn’t been created yet. Referencing the table directly throws an error, comparing the wrong types of data.
Instead of using brute force all over your app to pull the user information, I would implement the current user system inside your app.
Forgive me I’m on mobile, it’s difficult to search through the community and find the specific post to give you a link. But if you search for current user, you’ll eventually find a post I made a long time ago describing how to do this.
OK - I have implemented your approach and got it working, except I’m having a few issues.
This function isn’t to allow the users exclusive access to the app, it is simply to allow them to clock in and out. It is an administration app, that has other functions. The problem with this setup is now every time I try to edit an existing record, it just repopulates everything with my own data, corrupting the record, instead of allowing me to edit existing data. I would do this if someone forgets to clock out, for example.
How can I prevent it automatically updating the record once it’s created?