How to filter a list held in custom state for a repeating group

Hi have a list saved in a custom state. The element is called “Chat” and the data type is “Message”. The custom state variable is called “Message List” and it’s a list of Messages.

There are three types of roles and I want to exclude one of the role types in a reapeating group. The Chat Role is a field in Message.

When I choose “filtered”, however, I’m only able to include via “=”. I don’t see “and” or “or” as an option.

What am I missing?

<> means “is not” then do your one role

1 Like

:filtered is clientside operator though so they can still see those messages in the dev console if they wanted to.

thank you! Is there a way to keep folks from seeing the info in the dev console?

Is there a way you can search for messages instead with those same constraints?

I guess I could add another field when each item is created that is binary and just use one constraint.

When you store that list in the custom state, it is downloading the entire list of messages then your :filtered is just picking which ones to show on screen. That is why they can snoop around in the dev console if they wanted to and see the entire list.

It is best to either do your initial search with the constraints so it only downloads what you want them to see, or have privacy rules block what they shouldn’t be seeing in the first place (if possible, sometimes privacy rules aren’t possible with certain DB schema)

1 Like