Show stores when open , Hide when closed

Hello

I have a repeating group with dozens of stores names, every store has an opening time and a closing time that is sometimes different from another, for example:

Store 1 :

Sunday: opens at 1 pm, closes at 6 pm
Monday: opens at 10 am, closes at 8 pm
Tuesday: opens at 10 am , closes at 8 pm
Wednesday: opens at 10 am, closes at 8 pm
Thursday: opens at 9 am, closes at 10 pm
Friday: opens at 10 am, closes at 5 pm
Saturday: closed

.

Store 2 :

Sunday: opens at 2 pm, closes at 5 pm , open at 8 pm , closes at 11 pm
Monday: opens at 10 am, closes at 2 am
Tuesday: opens at 8 am, closes at 2 am
Wednesday: opens at 8 am, closes at 2 am
Thursday: opens at 8 am, closes at 3 am
Friday: opens at 9 am, closes at 1 am
Saturday: opens at 10 am, closes at 11 pm

I want to show the stores in the repeating group when open, hide them when closed in local time
how can I achieve this?

1 Like

Set the data source to show only open stores. For example: Do a search for stores, where: current day’s open time > current time & current day’s close time < current time.

Of course, the details of the query depend on how you’ve set up your database.

Best of luck!

how can I store the open & close times in the database without using too many fields?

One way would be to create a table called Store Hours, and have the fields:

  • Store
  • Day of the Week
  • Open Time
  • Open Time Zone
  • Close Time
  • Close Time Zone

Then, for each store, you’d have 7 rows within the table, one for each day of the week.

This topic was automatically closed after 70 days. New replies are no longer allowed.