Repeater Filter Counter?

Hi,
I have a question regarding applying filter to a repeater and getting a count. Please see my file. The counter works when there are rows visible, for example, “Boys” and “Casual”. However, when rows are not visible, try selecting “Dress”, I am expecting to get counter 0 and it is not updating. I tried using visiableItemCount and ItemCount. What am I missing?

repeaterFilterCounter.rp (69.0 KB)

1 Like

Hi!

The Item Loaded event is triggered once per visible row in the repeater. (In this case “visible” means “not filtered out.”) If all rows are filtered out, Item Loaded isn’t triggered at all, so the set text command that sets the count never executes.

I’d move the Set Text command that updates the count from the repeater’s Item Loaded event to the click event on the filter (like “Dress”). Psuedocode:

On Click or Tap (of filter button in dropdown)
  set repeater's filter
  update text on counter to the repeater's item count

Got it working! Than you @josephxbrick YOU ARE GREAT!

1 Like

Hi @josephxbrick, the counter is working as expected. The next step is to add a message when the list is empty. I added the conditions to the option onClick. Please see my file. However, the message didn’t show for “Dress” the first time, but showed for “Girls” and “Summer”. Then it would not clear for “Casual”. Can you please let me know I am doing wrong?
Thanks so much!
repeaterFilterCounterWithFeedback.rp (72.6 KB)