Filtering repeater makes repeater disappear

Hi all

I’m trying to filter a repeater. I have a column in the repeater called Category and a button to apply a filter:

[[Item.Category == ‘Plants’]]

When I click the button, everything disappears.

1 Like

Are there no rows that have “Plants” in the Category column? Because your filter will only show rows that have “Plants” in Category. If there are no such rows, then it will look like the repeater disappeared because there’s nothing to show.

There are definitely rows that have Plants in the category column. I even copied and pasted from the data view for the repeater to make absolutely sure I wasn’t doing anything silly. There is also an ID column. If I change the filter to:

[[Item.Number > 5]]

That works fine. I’ve tried Plants, ‘Plants’ and “Plants” but nothing works

What about the column name in the filter? Any chance of a typo there? Is there any other logic? Does it work in an otherwise empty file? Any errant spaces? I’m running out of guesses.

But really without showing anything no one can really help but for blindly guessing.

Yeah, just had a look and there’s nothing in this that isn’t in the public domain already so I’m ok to post the RP file which I’ll do later.

Thanks for your suggestions!

I’d also suggest copy/pasting only the repeater in question to a brand new file and rig up a test button to apply the problematic filter, just to help isolate where the issue lies. If it still doesn’t work, then you can just share that file; it’d be a lot easier for someone else than digging through a complete file.

Well, I’ve got it working after a fashion. I replaced the string i the category field with a numeric value and changed the filter to [[Item.Category == 2]] and that’s working. For the purposes of this, it’s fine and I have a load of cards to copy and paste from a live site so I’m going to park this now and come back to it later.

Hi ajacobsuk!

If you were running into that behavior on a Mac system, it could have been due to a known issue we have on file where Mac smart quotes interfere with repeater rules firing correctly. To work around this issue, you can navigate to “System Preferences > Keyboard > Text” and deselect “Use smart quotes and dashes”. Once this change has been made, you can try creating your filter rules again.

I hope this helps!

2 Likes

Yep. Just done tried that for one filter and it works perfectly. I probably won’t change it for this prototype but it’s definitely one to remember for the future. Thank you!

Hi ajacobsuk,

I ran into this issue recently as well. Another simple way to avoid this might be to apply the following filter logic when the user clicks on your “Plants” button:

On Click/Tap > Add Filter:

[[ Item.Category == This.text ]]

That way you don’t have to worry about the quotes (as long as the text string on your button matches your Category name in the repeater dataset).

Happy Prototyping,

Francis

1 Like

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