If any data is repeated, how to hide a reference table?

I have a reference table in this app to enter daily attendance information.


For a single name per day, data can be collected multiple times through the main form.
3X_5_2_52c45d697786a36f02d1865576b3f23a44e537e1.png
I want to make this attendance reference table one time active per person per day.
Simply put, the attendance table can only have one record per person per day.

What expression should be written for โ€œShow _ifโ€ in the main attendance related virtual field in the main form?

0 1 114
1 REPLY 1

There are a couple of approaches you may use.

  1. The easier but somewaht not so elegant is to add a duplicate preventing valid_if expression in the [Attendance ID] column of the attendance table.
    The expression in valid_if of [Attendance ID] in child โ€œAttendanceโ€ table can be something like

ISBLANK(
FILTER(
โ€œAttendanceโ€,
(AND([_THIS] = [Attendance ID], [Name with Initial]=[_THISROW].[Name with Initial]))
)
- LIST([_THISROW])
)

Here โ€œAttendanceโ€ is name of the Attendance table. Please change suitably.
This will prevent more than one child record being created for the same day per person. However, it will NOT hide the โ€œNewโ€ button after adding one record in the attendance table.

Please take a look at the last part of the article below on duplicates prevention approach.

  1. There are more elegant ways but a bit cumbersome to implement. I will post references to those soon.

Edit: Please refer posts below

https://community.appsheet.com/search?q=disable%20child%20add%20button

Edit: Some edit to expression to make it person specific.

Top Labels in this Space