Forum Academy Marketplace Showcase Pricing Features

A list calling another list

So, I have a list of attorneys, and each attorney can have many cases…

I have two tables with the proper:

  1. List of Cases field as a type “Case” in the attorney table, and…
  2. Attorney field as a type “Attorney” in the case table.

Imagine a repeating group on the left with a list of all attorneys.

Then a repeating group on the right side that displays a list of all cases.

see example image here:

For each Attorney cell, I built an icon that when clicked, I want the right side to only show the list of this attorney’s cases.

How do I do this in Bubble?

The way it should work is that the list of the rep group on the right should have a search that depends on the cell that was clicked on on the left. The action you want to use in the workflow triggered by a click on the icon is

I did that, but it doesn’t let me define the constraint as being of type “list of things”

In other words, when user clicks on icon on left (a particular attorney), I created an action: “Display List in a repeating group)”

Please refer to my example here…

I choose the right group, but in the data source, I cannot choose a constraint of type:

Search all cases where “Case.Attorney” = This Cell’s Attorney.

It shows in red and it doesn’t work.

I can only link them by a common field, like AttorneyID, which is a field I had to create in both tables in order for the link to work. But I don’t want to use that. Otherwise why create these fields of type “list”?

In other words, this works:

Search all cases where “Case.AttorneyID” = This Cell’s Attorney.AttorneyID

Any help would be appreciated. Thanks.

I figured it out.

In order to work, the definition of the lists must be done at the data source box, and not at the other box that opens where you can add constraints.

So, in my example, the right hand side (cases) should be built like this:

Source: Cases

Data Source: “Search for Attorney’s Cases”

So, in the data source box, I must choose the Attorney table (and not the Case table again, which is what I was trying to do) with no constraints and then I can build the above expression in the data source field itself

Brilliant! Looks so much cleaner.

1 Like

Hey Macro101- I too am trying to use a list to call another list. Can I see your example?