Repeater filter on page load does not seem to update visibleItemCount


#1

Hi

I am being driven slowly mad by what seem to be intermittent issues with Axure prototypes not obeying the ‘rules’ in terms of event loading and interaction execution. A prototype I was working on was working exactly as desired for about 2 hours, then, with no change to the file itself except closing and opening, it now ceases to work the way I would expect it to. I can’t tell if this is me, my computer, or a n axure bug in v9.0.0.3707 Mac.

The problem:

I want to use cases to set a filter on a repeater on page load. The case takes a variable value and applies a repeater filter based on this. Once the filter is applied, I want to update a variable with the visibleItemCount so that I can render it in a text object.

I have found a number of oddities:

  1. Using onpageload to set the filter and subsequently set the variable/text values always fails. While the filter is applied, the visibleItemCount does not get set. It only happens on the onload page event, so it may be a conflict with the timing of the repeater’s load event, but I’m not sure.
  2. If I use a click action on a button on the page then it all behaves as desired.
  3. If I try to fire a click action using “Fire Event” on the same button, inside the onpageload event, it does not work.

Any ideas?test-load.rp (176.9 KB)

Please save me from going completely mental. I’ve been at this for hours (and hours)


#2

Hey, Iain. I think it is indeed a timing problem. The counts are getting updated before the filtering is complete. Adding a brief wait in front of the OnPageLoad actions works, but so does adding it before the counts are updated.

test-load.rp (464.6 KB)

Jeff


#3

Thanks Jeff! Long time no … whatever. I’ll give it a try. Timing may explain why the outcomes are a bit random.


#4

This is one of those instances where Axure does a less-than-stellar job of showing what is actually happening to your repeater.

Like Jeff_Harrison said above, you might need to add a brief wait.

Another thing to try could be using the following condition for your repeater:
OnItemLoad
If Repeater.dataCount (the total # of rows in the repeater) equals Item.Index (the row # of the current row being loaded), Apply Filter.

That ensures that all the items in the repeater have loaded, and there won’t be an error or conflict where the repeater’s not done loading before the filter gets applied.


#5

Thanks @ease

Jeff’s suggestion did work, but yours looks a little more bulletproof. I’ll give it a try and see.

Thanks to both of you for your help.