Copying some values to a specific row between three tables.

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.

KeyDateEmployeeIDNameTime InTime OutTotal Hours
7b4a9da03/6/20224Rob Middleton7: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. 

KeyDateEmployeeIDTime Out
6de930cb3/6/2022418: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 Solved
0 8 269
1 ACCEPTED SOLUTION

Hi @meeple 

From the discussion so far, I believe this is similar to what to want to do.

Animation.gif

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

TeeSee1_1-1646725259048.png

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].

TeeSee1_0-1646725201455.png

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)

โ€ƒ

View solution in original post

8 REPLIES 8

Welcome to the community,

Instead of having another table for the sign-outs, why don't you just have sign-out action in the first table, make it visible for an employee if he's signed in and still not signed out, and fill the Time Out column accordingly?

Well, this app is meant to be used by a supervisor signing in/out a ton of people. So it won't be a bunch of users signed in to the same app. I tried to make a Sign-out action on the timesheet table but I still can't figure out how to enter a date and employeeID, then find that record and sign him/her out.

One way is that you make a daily slice for the Timesheet table, with a row filter condition: TODAY() = [Date]
Then you link a view to that slice. 
The supervisor will open the Daily Timesheet view, use the search to scan the employee ID, the corresponding record will show. Upon opening the record the detail view would contain an overlay Sign Out action button, that will just fill in the Time Out column with the current time. 

That gives the behavior Id like but in just more steps. It would be better if the only thing I had to do to sign a person out would be to scan the nfc tag... similar as signing them in.

Is there possibly a way to do this with Input()? I don't really understand how that functionality works though.

Hi @meeple 

From the discussion so far, I believe this is similar to what to want to do.

Animation.gif

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

TeeSee1_1-1646725259048.png

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].

TeeSee1_0-1646725201455.png

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)

โ€ƒ

Yesss... that's precisely what I wanted to do. Thanks very much!

Top Labels in this Space