Due date in 2 days…except for Sunday?

I run a library, where people check out tools and movies.

Borrowed items are due for return after two days, except if the due date falls on Sunday (when we’re closed).

How do I handle this using a custom formula?

One option I thought of is to create a collection of days (Monday through Saturday). But would this be treated as an actual calendar for scheduling purposes?

I’d appreciate any help guys. Thanks.

@MikesClub

Date picker = Today+2
Text input = Date Picker (Short day format)

Button 1. Visible if Text input = “Sun”
Due date = Today +3

Button 2. Visible if Text input not = “Sun”
Due date = Today + 2


Please mark the post as a solution if this has solved for you.

Brilliant!

I’m starting to realize that most problems in Adalo can be solved with either visibility rules or invisible rectangles!

Thank you!

What you say is true, but then you will be unstuck by something relatively simple that you take for granted in most other applications.

This got simpler with Adalo recently adding more date format options. With formula you might be able to use the unix time stamp, being based on 01/01/1970, which was a Thursday. But as the above works and it’s simple, then why not.

:smiley:

Hi @Rozza ,
Nice solution, another alternative to avoid 2 buttons and visibility conditions on frontend, would be to add 2 click actions with a sometimes condition on both with same premises as you stated but using one button only:

1 Like

Even better!

1 Like

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