Hi, I'm building a personnel on board tracking system.
the ideas is so simple. every time you scan the qr code, it will be patched into the datasource.
the question is, how to make patch formula so if a employee who last scan "CHECKED IN", then the next patch input automatically be "CHECKED OUT".
and if the employee scan the QR code again, it will be patched as "CHECKED IN" again.
i tried this formula but it doesn't work.
OnScan=
Patch(Table1,{CICO:If(IsMatch(Last(Filter(Table1,Name=BarcodeScanner1.Value).CICO).CICO,"IN"),"OUT",
IsMatch(Last(Filter(Table1,Name=BarcodeScanner1.Value).CICO).CICO,"OUT"), "IN")
,
Name:BarcodeScanner1.Value,
Date:Text(Now(),"dd/mm/yyyy"),
Time: Now() })
thanks