Vídeo sem título Feito com Clipchamp 5
  • Dezembro 11, 2023

Siga-nos

Power Apps: How to create a Clock In app by scanning NFC tags

In this post we’re going to look at a simple Clock In application, an app that allows you to manage the entry and exit of a company’s employees. We’ll cover its functionalities as well as the path it took throughout its development.

 

Step 1

To create this application in Power Apps we used a few controls, the main ones being: a vertical gallery and a button.
It is this button that allows the user, when pressed, to read the NFC tag that indicates the entry/exit of an employee from the company. Once the NFC tag has been read, the employee’s name (Title column), email (Email column), clock-in/out times (Dia e Hora column) and whether the employee is joining or leaving (Entrada/Saída) are passed on to a Sharepoint list. This code was used to read the NFC tag and map the different fields:
 
With(ReadNFC(),
Set(id, Coalesce(Identifier, “No ID”));
ForAll(NDEFRecords, Patch(‘Controlo de Ponto’, Defaults(‘Controlo de Ponto’), {‘Entrada/Saída’: Coalesce(Text, URI), Title: User().FullNome, Email: User().Email, ‘Dia e Hora’: Now()})));
 

Step 2

It is via the Sharepoint list that the gallery will be filled with data, so that you can see all the entries and exits directly in the application.
 

Step 3

The app also allows you to check how many employees are currently in the company, with the number increasing after each entry and decreasing after each exit. To perform this calculation, the following code was placed in the Text property of a label:
 
CountRows(Filter(Gallery1.AllItems, ‘Entrada/Saída’ = “ENTRADA”)) – CountRows(Filter(Gallery1.AllItems, ‘Entrada/Saída’ = “SAÍDA”))
 
With just these three steps it is possible to create a very simple Clock In app, which you can see below in a short demonstration. For an improved version of the application, stay tuned for the next post.
 
Vídeo sem título Feito com Clipchamp 5

Rui Couto

Leave A Reply

O seu endereço de email não será publicado. Campos obrigatórios marcados com *

Últimos Posts

Julho 19, 2024
Visual calculations no Power BI – mais uma inovação radical
Julho 10, 2024
Criar um modelo financeiro em Excel a partir de uma app amigável – a Finance App
Julho 10, 2024
Creating an Excel financial model with a user-friendly app
Julho 5, 2024
Modelo financeiro Excel para tomada de decisão – comprar ou arrendar um imóvel?