Can I trigger True/False based on date?

My library app is coming along fine. My latest problem:

I have a LibraryRecord collection, which works like a library card.

It has a due date (a date field),
a returned date (also a date field),
a “returned?” True/False toggle,
and a “returned late?” True/False toggle.

When I check the “returned” toggle, the database is updated with “true”, and the “returned date” field is updated with current date. This works as intended.

But how do I update the “returned late” toggle?

I don’t want to check two boxes on the screen.

Here’s my idea. Please tell me if there’s a better way:

Instead of using one “returned” toggle icon, I use two, with visibility rules.

The top toggle is the regular “returned” switch. It just updates the “returned?” T/F field. It is visible if the item is not yet late.

The bottom toggle is only visible if the due date is before start of today. Clicking it updates both the “returned?” field and then"returned late?" field.

Is this the best approach? I’m trying to avoid using visibility rules when I can, but it seems like sometimes its unavoidable.


I went with my “visibility rules” idea, and it works fine. Still looking for alternatives though!

Hi Michael,

Maybe adding that update action on the toggle as conditional? :eyes:

Thank you

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.