Filtering on a repeater using multiple values in a global variable

What’s the best way of setting up a filter for a repeater that brings back all records that match any value in a global variable?

For example, the variable might contain a string like: “DD,FF,VV” which would be used to match on a column in a repeater called “ID” which might contain “DD” or “VV” or “XX” or “NN” etc. The values here can be anything - I’m just using letter pairs for an example.

So essentially - whatever appears in the global variable would bring back records in the repeater that match any of those values.

I’m assuming I’d need to “pre-process” the variable in some way to “feed” the output into a filter, but I don’t quite know where to start…

Here you go:

Filter Lots.rp (51.0 KB)

Ah! I tagged this post as Axure 9 when in fact I’ve only got Axure 8. I can’t open that file :frowning:

The relevant filter rule is this:
[[filter.indexOf(item.column0) >= 0]]

Where “filter” may be either the text on a widget containing the string that you describe above, or the name of a global variable containing such text. I’m assuming (as you can see) that the relevant column in the repeater is called “column0”

Let me know if that works.

1 Like

Ah - that was easy! Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.