Have 'Open Now' button filter repeating group

Hi, I have a list of stores and each have their hours of operation. There’s an Hours data type and each data field is a day of the week as a date range. I have a page that shows a store with their hours and made a text that changes from ‘Open’ to ‘Closed’ using these conditions:

On another page of search results, I have an RG of the stores and I have an ‘Open Now’ button that when clicked, I’d like the RG to adjust to only show the stores that are currently open.

Search results page:

‘Open Now’ button logic:

Problem is, I can’t get the ‘Open Now’ button to work as it should and I’m stuck on how to build out the logic. Any help is appreciated thanks!

Hey @sydneyng :wave:

I can see why this is difficult. I’m not at the computer at the moment. Let me see if I can help anyways. Just by looking at the images, it seems that you don’t need an ‘only when’ conditional on the workflow step. You would just have the data source filter all the open stores. Try keeping the ‘only when’ condition blank and show us an image of what the filter you have on the data source is. You might already have it working just by clearing out the ‘only when’ condition.

Hope that helps! :blush:

@j805 www.NoCodeMinute.com

For All Your No-Code Education Needs:

  • One-on-One Tutoring
  • eLearning Hub
  • Video Tutorials

Hey @J805 ! I deleted the ‘only when’ condition and unfortunately the button still doesn’t work :confused:

Here’s what I have on the button currently:

Filtering logic:

In the filtering picture, ‘search-results’ is the page name and I created a custom state called ‘RG_fiter’ that filters the RG when check boxes are clicked (these are found in the duration filter button to the left of the open now button). I’m wondering if I have to create another custom state for the open now button?

Hey @sydneyng

What do you mean by, it doesn’t work? Do you mean that the list is empty after you press the button?

Does the repeating group display the correct results on page load but then just doesn’t show an updated list when you press the button?

I hope to be able to help on this one, but it seems like it is going to be pretty tricky. :blush:

@J805 I just found the solution! I had to set a state using the custom state I had already built:

I placed this right before the ‘display list’ flow.

Before, when I clicked the ‘Open Now’ button, the RG wasn’t changing its list of stores. All stores remained visible so the RG wasn’t getting updated properly.

1 Like

Awesome! Good job. Glad you got it working. :raised_hands:

1 Like