Filtering page by day


I am building a client management software for my business. I am trying to filter this repeating group by the Day column. I will have a page as you see in the image above, displaying all the users clients, but I will also have a page that only shows the clients that are due for that particular day. If today is Friday, and I click the “Today” page, I want to only see the clients who are scheduled for Friday. I assume I will need a date/time plug in, but I am unsure of which one.

here is the project link.
Thanks!

Hi there, @spaanllc… if I understand your post correctly (and I might not because your description is a bit confusing, but I am taking today to always mean literally the current day based on your example), you should be able to get the desired result by adding two constraints to the search in the data source of the repeating group on the today page, and those constraints would look like this.

Service Date >= Current date/time:rounded down to day
Service Date < Current date/time:rounded down to day +(days): 1

Hope this helps.

Best…
Mike

1 Like

Thanks so much!
I am new to this, so apologies for any confusion. Thanks for working with me :slight_smile:
I am having a hard time understanding what you mean by “to the search in the data source”. Is it possible for you to send a screenshot of where that would be?

1 Like


Did I do this correct? It isnt working when I run it.

Yes, the constraints look fine, but you have a privacy rule on the Client data type that could be getting in the way.

Did I fix the privacy rule? It still isn’t working?

Well, I wasn’t saying the privacy rule was broken… I was just pointing out that you have a privacy rule in place on the Client data type, so maybe it was getting in the way. An easy way to test that is to delete the rule altogether and see if it works. If it does, then at least you know that privacy rule was the issue, and you can go from there.

The above being said, it looks like the constraints in the screenshot in your previous reply are no longer there. Also, it doesn’t look like any of the clients in your database have a date in their Service Date field. Are you even using that field or are you just trying to go by the Service Day field?

The constraints are on the logged_in_today page in the repeating group. I just noticed that I had made the constraint using “Service date” which is not what I was trying to do. The Service date field is a type “date”. I want it to be on the “service day” field, which is a “text” type. Is it possible to still add that constraint using a text?

I made an attempt to do the same constraint but on the service day, and it didnt allow me to use “>=” I am assuming its because its not a number.

No, you can’t use those constraints on a text field. Start by deleting that field, add a new field that is tied to your Week option set, and add an attribute (number) to the option set and number the options from 0 to 6, starting with Sunday as 0. Oh, and get rid of the second Sunday in the option set.

Should each attribute be labeled: i.e “Sunday 1” ?

I added 7 attributes. Check and see if that is correct

No, that is not correct at all. If you want to open up your editor, I will set it up for you. If you don’t want to go that route, I think the knowledge gap is too big to explain everything here in forum messages.

I will open the editor :slight_smile:

should be open
Thanks!

Okay… the option set is fixed, there is a new Service Day field on the Client data type, and there is a filter on the repeating group’s search to show clients where the day in the their Service Day field is the current day. I also changed the day dropdown in the repeating group to link to the option set. Finally, I set the day to Saturday for 4 clients linked to user tylerpp@gml, so if you run as that user, you will see those clients because today is Saturday.

Thanks!
I want the “route” page to store all of their clients, and the “today” page to show just the ones that are scheduled for that day. How could I make this happen? So if I add a client on the route page that is scheduled for today/saturday then it shows on “today” page?

Any client who was created by the current user and whose service day is set to the current day will show up on the today page.

On the tylerpp account, the today page is showing all saturdays, but the “route” page is showing different days