TENHO UM APLICATIVO ONDE O USUÁRIO COLETA INFORMAÇÕES DE DETERMINADOS EQUIPAMENTOS.
CADA EQUIPAMENTO TEM UM QR CODE, E QUANDO LIDO ESTE QR CODE ABRE UM FORMULÁRIO PARA INSERIR OS DADOS.
NECESSITO QUE QUANDO O USUÁRIO ABRIR UM NOVO FORMULÁRIO PARA INSERIR NOVOS DADOS TRAGA OS 6 ÚLTIMOS REGISTRO DE UMA DETERMINADA COLUNA PARA QUE O USUÁRIO CONSIGA VISUALIZAR.
ESSA COLUNA ESTÁ FORMATA NO TIPO ENUM. TRAGA UMA LISTA COM OS ÚLTIMOS 6 REGISTROS DESSA COLUNA. FAZER ISSO PARA CADA EQUIPAMENTO QUE LER O QR CODE.
Here's something I put together with some help from ChatGPT.
To solve this type of problem in AppSheet, you can follow this approach:
When a user scans a QR code and opens a form to input data for a specific piece of equipment, display the last 6 values from a specific Enum column related to that piece of equipment. This helps the user view recent history and avoid input errors.
[EquipmentID]
), which you can use to filter related data.Table name:
Records
Enum column:
[Status]
Equipment ID column:
[EquipmentID]
Timestamp column:
[Timestamp]
TOP(
ORDERBY(
SELECT(Records[Status], [EquipmentID] = [_THISROW].[EquipmentID]),
[Timestamp],
TRUE
),
6
)
This returns a list of the last 6 values (most recent first) from the [Status]
column, filtered by the current equipment.Show
column as plain text, use:
TEXT(
TOP(
ORDERBY(
SELECT(Records[Status], [EquipmentID] = [_THISROW].[EquipmentID]),
[Timestamp],
TRUE
),
6
)
)
The TEXT()
function converts the list into a single string.6
to any other number of records you want to show.This method allows the user to quickly see recent history for each piece of equipment when entering new data.
User | Count |
---|---|
18 | |
10 | |
8 | |
5 | |
5 |