"Intersect with" only showing first item

Hello,

I want to display data in a RG, constrained by a uses selected drop down.

In other words, user can filter my RG based on “tags” that are associated with each item in the RG.

My filter looks like this:

focusing on the 2nd filter…

In the scenario where my Ticket (data structure with associated “tags”) has the tags {a,b}, and the user selects filtering based on tag {‘a’}, my RG is not showing this ticket.

Can anyone offer insight? I’m stuck

If you haven’t yet, check Privacy rules if that is hiding other Tags or Tickets.

Also just a side note, move the Status constraint to the Search for better performance. Better to let the server-side search reduce down the number results before the client side :filter has to filter more.

thanks for the help, privacy isnt the culprit here. Does the logic look sound? I’ve been struggling with this for a few days now.

The logic seems fine, you could try removing the first filter and also unchecking the “Ignore empty constraints” just to make sure there’s no issues there.

Does your search have it’s own constraints getting in the way?

And other operators after your filter in the Repeating Groups data source?

Has the repeating group had more than 1 item before? Make sure there’s a enough room to seem more and it’s not set to static # of rows and columns

Also make sure your database actually has the data you expect to see

I flushed my data bases and re-created some data structures, no dice.

there is a similar forum post about this similar topic, but unfortunately the asker closed it after inactivity for 70 days.

I already helped other folk here with a similar issue: filtering many to many.

See if this is what you are looking for:

Here is the link to the editor.

Hope it helps!

Unfortunately, no, that is not what i am doing at all.

Your example uses contains. This compares full lists to full lists, not item intersection

@brianbigdelle

The example I gave filters a Repeating Group based on a list of elements (tags) selected in the multidropdown, showing the elements that have items in common (intersect with)…

It seems that this is exactly what you are trying to do…

1 Like

currently watching … replying… with amusement.

2 Likes

Don’t even know why I waste my time replying…
Not even a “Thanks for trying to help”…

1 Like

thanks for sharing the example, but it’s not addressing the issue, unless i misunderstand your expression.

My target is to return all Data types that have the selected tag in them. It is OR logic, not AND.

Your app chooses the baskets that have Fruit1 AND Fruit2 AND …

That is simpler…

Made another exemple:

Editor here.

Again, appreciated, but I have this exact logic implemented. You can see the screenshot in the beginning of the post. For some odd reason, this is not performing as expected on my app.

Can you share the editor?
There is clearly something wrong that you are not seeing…

Oh ok let me figure out how to do that, few moments

ok try this please

There’s all kinds of issues here…

But primarily you’re not using list fields correctly…

You have a field on your Ticket datatype, which is set as a list of texts…

But each ticket only has a single text, which contains various ‘tags’ (which are just texts in your app) separated by a comma…

That’s not going to work (at least not the way you’re trying to make it work)…

For a start, I’d recommend creating a ‘Tag’ datatype instead of using texts…

But regardless, you need to store a list of tags on each Ticket, rather than just a single text as you currently are…

So sort out your database structure first, then simplify your RG search…

3 Likes

Here’s how I would do it… without using any conditional datasources, and using a Tag datatype…

Tag Intersect - Preview

Editor

1 Like

Also, vis-a-vis testing - even if those tags were stored properly, there’s very little test data in here and as far as Tickets that have more than 1 tag, it looks like there are only intersecting tags for “Repairing”? (Which I believe would net you two Tickets were this implemented properly.)

1 Like

ok sorry i don’t completely follow. Why does each Tag field within Ticket only have a single text? It’s a list, right? When i create a ticket, i add in the selected list of tags. Shouldn’t this append to the end of the existing (empty) tag list?