I apologize if this solution is mentioned elsewhere but I couldn't find anything that quite covered it.
I'm making a simple timesheet/attendance app that's using NFC tag scanning.
Basically the idea is that the NFC tag contains an Employee ID that matches up with an Employee Name.
When an employee signs in, all they do is scan their nfc tag. A record is created on a Timesheet table, where the employees name is looked up in a different table and filled out, as well as the date, and sign in time. The sign out time is left blank for now. This part is working perfectly at the moment.
Key | Date | EmployeeID | Name | Time In | Time Out | Total Hours |
7b4a9da0 | 3/6/2022 | 4 | Rob Middleton | 7:00:00 | 11:00:00 |
When an employee signs out, I want them to follow the same process, simply scan their nfc tag and it will sign them out for the day. The problem is trying to reference and update the row where they signed in initially.
Key | Date | EmployeeID | Time Out |
6de930cb | 3/6/2022 | 4 | 18:00:00 |
So ideally, I open a Sign out view, add an entry which consists of a date, employeeID, and sign out time. Then I use a bot to copy the sign out time to the record that matches the employeeID and date on the Timesheet table.
Can anyone help with how to identify and copy this information to the correct row?
Thanks very much.
Solved! Go to Solution.
Hi @meeple
From the discussion so far, I believe this is similar to what to want to do.
If so the following is what you can do (you are right on. you use INPUT)
First create an action to update the time_out value in the IN table. (Well it contains both time_in and time_out, but a minor detail...)
The key here is to use an INPUT function to receive a value from the next action you create and fire on table OUT
This is the action on table OUT.
Here you select the target row in IN table by specifying the DATE and EMP ID in Referenced Rows.
You can select what value to use as an INPUT value under With These Inputs. Here simply the column [time_out].
A few other considerations..
You want to make sure that there is a row in IN containing the matching emp_id, date and the time_out should be blank when you are selecting the emp in the check_out form.
So enter a suggested values expression in the emp_id column of table OUT like
SELECT(IN[emp_id],
AND([date] = [_THISROW].[date],
ISBLANK([time_out])
)
)
I have not even considered such cases as do people actually check in and out across a day?
Check in/out twice a day?
These may never occur in your case.
If you are interested, see timesheet here (https://www.appsheet.com/portfolio/3401559)
User | Count |
---|---|
16 | |
10 | |
8 | |
5 | |
5 |