Appsheet

Hi there everyone, I am new to appsheet and I have been working on a small personal project. I have a spreadsheet which contains data for some students (ID number, Names and Program) (sheet1) and on the other sheet I have another sheet call "scans" which contains (scan_id, ID number, and Datetime). I generated some QR codes based off these students "ID number" and I am trying to scan/store data (Scan id, ID number, Datetime) inside "scans" based on certain conditions:

1. The ID number/QRcode scanned is present in sheet1

2. They are allowed to scan only once within these times (8 am - 9am) (12 pm - 1pm) and (5pm-6pm)

If it meet these category then their data is insert inside the "scans" sheet else I need to pop out an error message. Can someone help me with this?

Thanks in advance  

0 1 36
1 REPLY 1

As per my understanding it should work as per below. 

 

In the app editor, go to Behavior > Workflow.

Create a new workflow rule for the "Scans" table.

Set the condition to check if the scanned ID number exists in the "Students" table using an expression like: IN([ID number], Students[ID number]).

Add conditions to check if the scan time falls within the allowed time slots using expressions like: AND(HOUR([Datetime]) >= 8, HOUR([Datetime]) < 9) for the first time slot.

Add actions:

If conditions are met, add a "Add a new row to another table using values from this row" action to add a new row to the "Scans" table with relevant data.

If conditions fail, add a "Data: execute an action on a set of rows" action to show an error message.

Data Validation Rules:

In the app editor, go to Data > Tables > Scans.

Define data validation rules to restrict scanning to only once within each time slot.

Use expressions like: COUNT(SELECT(Scans[ID number], AND([ID number] = [_THISROW].[ID number], HOUR([Datetime]) >= 8, HOUR([Datetime]) < 9))) = 1 to ensure only one scan per ID number within the specified time slot.

 

 

Top Labels in this Space