NFC tag toggle-timestamp

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
Jptooch
Posts: 7
Joined: 01 Nov 2019 00:09

NFC tag toggle-timestamp

Post by Jptooch » 25 Nov 2019 15:39

Does anyone know a way to setup one NFC tag to toggle and timestamp? For example, punching in for work scan would punch in. Same tag would then punch out when going to break, then subsequent scan would then punch in from break.

Thanks Jeff

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: NFC tag toggle-timestamp

Post by Desmanto » 25 Nov 2019 18:06

I don't have NFC enabled phone, although I have the tag. So can't test exactly with NFC. But the concept of first trigger get to punch-in, breaktime-out, breaktime-in, punch-out; can be implemented by storing the triggertime to a global variable.

Example, the simplest form is to add it to the newlist for every trigger. Create a global variable, global_attendance, with the type list, leave it blank (just OK). Then add script after the triggertime

Code: Select all

addElement(global_attendance, triggertime);
For every trigger, it will keep adding the time to the list, and you can check the time later. After end of day, export this to a text file. You can use flow with trigger time at 00:00 (or any time you want).

However this has weakness. If the card double trigger or the person set the card outside of the designated time range, it will keep added to the list, making it confusing and require extra work to clean up. You can setup a time range, and check if the time is within the time range of the punch-in, then it will allocated to the punch-in (index 0). Breaktime-out allocated to index 1 and so on. Any double/triple trigger won't change the first added time at that day. Only the punch-out will keep changing if there is later trigger. (example someone punch-out at 17:00, but found out he need to work overtime until 19:00. If we don't logged the second punch-out, he/she will lost the overtime attendance proof).

To do this, you need to have a schedule time range where the punch-in/out, breaktime-in/out time. I have excel that do something like this. But it can be replicated too in Automagic.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply