Is there a way I can filter a repeater by a multiselect calendar by using conditional logic? In the file attached I want to multi-selects dates (say 10 - 18 march) and filter the repeater for those dates. Thanks in advance,
select dates.rp (204 KB)
Hi!
Yes. You’ve already got global vars StartVar and EndVar for your start and end dates. You’ll want to add a date column to your AvailableDates repeater that doesn’t include the ordinal format (e.g., “2” instead of “2nd”). We’ll call that column dateNum).
Now, OnPageLoad, create this filter:
Add filter [[Item.dateNum >= StartVar && Item.dateNum <= EndVar]] to AvailableDates
Once you create a filter, it stays in effect, so no need to delete it and add it again every time you hit the Show Available Times button. This causes poor performance.
Instead, force the filter you defined OnPageLoad to re-evaluate when you hit that button. Do this by performing a do-nothing Update on the AvailableTimes repeater. Basically, you’ll create an Update command with the rule [[true]] and select no columns to change. It will look like this once you create it.
Update rows set None where [[true]] in repeater AvailableDates
Note: Since you are using global variables, you may need to debug what’s going on with them. Just in case you don’t know, you can see the current value of your global variables in the HTML sidebar that Axure puts in the browser:
I’m sending good thoughts and wishes your way josephxbricks. Thanks so much.