Dynamic filtering of multiple items

Is it possible to build dynamic filtering of multiple items? Here’s what I mean (example):

Reviews from companies you follow
(Step 1 is all reviews for 1 company. Step 2 is all reviews for 2+ companies)

1/ List reviews for [Company A] from all companies:

21 reviews for [Company A] from [Company B]
12 reviews for [Company A] from [Company C]
3 reviews for [Company A] from [Company D]

2/ List multiple [Company] reviews from all companies

21 reviews for [Company A] from [Company B]
12 reviews for [Company A] from [Company C]
3 reviews for [Company A] from [Company D]

13 reviews for [Company B] from [Company A]
2 reviews for [Company B] from [Company C]
5 reviews for [Company B] from [Company D]

I’m finding this really hard to do because there are multiple dynamic variables.

Can you share what your tables look like ? Do you have one table for all reviews or the reviews are directly in your company table ?

1 Like

I think you can do this with a little creativity in grouping items in a collection (assuming you need the grouping text to say just like what you lined out in your post).

Create a query column in your reviews table, and filter by reviewer company is this row > reviewer company, and reviewed company is this row > reviewed company. A rollup over that query would give you the total count.

Then construct your pluralized column (1 => 1 review, others => X reviews).

Finally a template so that we get X review/reviews for … from …

Add a collection and allow filtering by the reviewed company, and group by the template above.

1 Like

Thank you, super helpful (as always!)

  • Sorry, I forgot to say, I want to return this in a text field so I can put it in the Description part of a List. Not sure I can do grouping in the case?

“Create a query column in your reviews table, and filter by reviewer company is this row > reviewer company, and reviewed company is this row > reviewed company. A rollup over that query would give you the total count.”

  • I’m not sure I clearly understand what you’re describing here. Can you elaborate?

“Finally a template so that we get X review/reviews for … from …”

  • I’m also unclear here.

Hardest thing I think for me is getting a row with a) 34 reviews b) beside Company XYZ, then the next row (/n), with a) 6 reviews b) beside Company ABC …instead of having a) all the reviews lumped together (34,6) separately from b) the company names (Company XYZ,Company XYZ). Does that make sense?

I’m finding this one’s maybe tricky to describe!

The final result would be in a template field, so you can use it in your list.

Please check the query column here.

That’s a template column of something like: X for Y from Z.

Where X is the string you get from the pluralized column.

Y is the reviewed company’s name.

Z is the reviewing company’s name.

I’m not sure I understand this. Do you have a visual representation of what you want to achieve?

Here’s what I’m trying to do. Does this help?
(Where a “Person” is an employee of a Company)

I think from the company table, you can get the information you need. Is the reviews table storing the review from and review for on the person-level or the company level?

Say Thinh, from company A, reviews hirereach, from company B, or do you just store a review from company A directly to company B?

“Is the reviews table storing the review from and review for on the person-level or the company level?”

At the person level.

“Say Thinh, from company A, reviews hirereach, from company B, or do you just store a review from company A directly to company B?”

No, it’s at the person level.

We could also do which companies have reviewed a person. I just don’t want to reveal the reviewer’s identity, just the company they work at.

Then I think you can use a relation on the Reviews table to then Lookup the company ID, and then go back to construct it this way?

Sorry, I’m feeling slow on this. I’m trying to catch up on the way glide does things vs airtable. Do you mean something like this?

Reviews → Relation → Company Name
Or
Reviews → Lookup → Company RecID
?

Then how do I get the number of reviews from each followed company beside the company name?

A relation establishes a link between a single row and one or many other rows by matching common values. So in the above case, you need something unique that identifies a Company in your Reviews table (usually a RowID), and then you can use that to create a relation between the two tables.

Important: A relation doesn’t contain any actual data. It’s just a link. That’s where the lookup comes in. Taking the above as an example, imagine that you have a CompanyID in your reviews table, and you need to know the Company Name. What you would do is create a single relation in your Reviews table that matches the Company ID with the same value in your Companies table, and then use a Lookup column to fetch the Company Name via the relation.

Create a Query or Multiple Relation column that matches the Company value in the Reviews table, and then use a Rollup column to get a count via the query/relation.

2 Likes

Thank you! Super helpful. Trying this now…

I think that may have done it, except for one thing.

I think I’ve got the “X reviews from Company A” part working, but when I try to break each result into its own line by adding “\n” between results, the line breaks are not working.

I’m using a Joined List field to get all the results into a cell in Glide, but in the Collection Description field that I want to display results in, it’s showing “X reviews from Company A\nY reviews from Company B\nZ reviews from Company C\n” instead of what I want:
“X reviews from Company A
Y reviews from Company B
Z reviews from Company C”

“\n” works in AIrtable but how do I fix this in Glide?

Use a “Return” or “Enter” key instead of \n. A carriage return character.

1 Like

Awesome, that worked. Thank you!

Last(ish) question on this…Now that I have an awesome list with line breaks, how do I add a first/top line to my list that displays some text that I wrote in a different cell?

Use a template column.

2 Likes

Thanks for your help, Darren!

Ugh, taking a step back, I’m actually still struggling with my core problem here (I thought I had it solved but I don’t).

Here’s where I’m stuck:

I have a Glide Lookup column named {ReviewFrom} that’s populated with the name of the reviewing company each time they reviewed for that Record/RowID:

  • Company ABC, Company XYZ, Company 123, Company ABC

Company ABC is listed twice because it has submitted 2 reviews for that Record/RowID.

I have a Rollup column that counts the total reviews from all companies (4), but that’s not what I want. I want the count per company in a Joined List column (or at least I think that’s the type of column I need to use).

For example (assume I’m using a Template column to connect the company name and Rollup column value), I WANT to list this in the Joined List column:

  • “Company ABC 2 reviews”
  • “Company XYZ 1 reviews”
  • “Company 123 1 reviews”

I do NOT want:

  • “Company ABC 4 reviews”
  • “Company XYZ 4 reviews”
  • “Company 123 4 reviews”

How do I get a column to do this? (Also, what type of column?)

You probably need a combination of a query column and a rollup column, but can we take one step further back, and can you show me what your Reviews table looks like?

Sure, I’ll try to demonstrate vertically here. I’ll start with the Airtable structure:

Reviews-Table columns:

  • ReviewFor (linked to People-Table)
  • ReviewFrom (linked to People-Table)
  • PeopleSessions (linked to PeopleSessions-Table)

People-Table columns:

  • Company (linked to Company-Table)
  • PeopleSessions (linked to PeopleSessions-Table)
  • ReviewsSubmitted (linked to Reviews-Table)
  • ReviewsReceived (linked to Reviews-Table)

PeopleSessions-Table columns:

  • Person (linked to People table)
  • Session (linked to Sessions table)
  • ReviewsReceived (linked to Reviews-Table)

I can’t share my actual table because I have lots of confidential stuff in there.

Does that help?