Set Visibility of Component Based on # of Records in a Relation Column

Hello. I have a Relation column (set to match multiple) in a Glide table and want to use this relation column to help set the visibility of a component.

For example, if the relation column matches more than 10 rows/records, I want to show an inline list component and if 10 or less I want to hide the same component. I could obviously use an If/Then column to set the visibility, but I don’t see any way to “count” the number of matches in a Relation column? Am I missing something?

My use case: I don’t like the fact that the default See All option for inline lists displays at the top of the inline list component (the user is forced to scroll back up to see more). Instead, I’m using an Action Text component at the bottom of the inline list to link the user to more records on a new screen. However, I don’t want to place all of these “See More” action text components manaually…I’d rather set a visibility condition based on whether there are more than 10 rows/records to be shown.

Thanks in advance for you any guidance/feedback.

Create a Rollup column to count the number of records in a relation.

Hi, Jeff. I appreciate you weighing in. I did look at using the Rollup column earlier but I got confused because when I was configuring the summary of values of field it always took me one level deeper to the original sheet’s boolean column and not the relation column itself so I didn’t think it would compute correctly.

I just went back in and tried it and was able to count the number of rows the relation captured so I’m good to go. Thanks so much!

2 Likes