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

**URL:** https://community.glideapps.com/t/set-visibility-of-component-based-on-of-records-in-a-relation-column/31341
**Category:** Ask for Help
**Created:** [September 3, 2021, 9:42pm UTC](https://community.glideapps.com/t/set-visibility-of-component-based-on-of-records-in-a-relation-column/31341 "2021-09-03T21:42:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![wcglider](https://avatars.discourse-cdn.com/v4/letter/w/f08c70/32.png) [@wcglider](https://community.glideapps.com/u/wcglider)
#### Post date: [September 3, 2021, 9:42pm UTC](https://community.glideapps.com/t/set-visibility-of-component-based-on-of-records-in-a-relation-column/31341/1 "2021-09-03T21:42:37Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [September 3, 2021, 9:55pm UTC](https://community.glideapps.com/t/set-visibility-of-component-based-on-of-records-in-a-relation-column/31341/2 "2021-09-03T21:55:49Z")

</div>

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

---

<div class="post-metadata">

### Author: ![wcglider](https://avatars.discourse-cdn.com/v4/letter/w/f08c70/32.png) [@wcglider](https://community.glideapps.com/u/wcglider)
#### Post date: [September 3, 2021, 10:09pm UTC](https://community.glideapps.com/t/set-visibility-of-component-based-on-of-records-in-a-relation-column/31341/3 "2021-09-03T22:09:09Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)
#### Post date: [January 17, 2024, 4:50pm UTC](https://community.glideapps.com/t/set-visibility-of-component-based-on-of-records-in-a-relation-column/31341/4 "2024-01-17T16:50:42Z")

</div>


