# Display the Count of items matched in a 'Relation' list

**URL:** <https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302>\
**Category:** Ask for Help\
**Created:** [February 5, 2020, 11:10pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302 "2020-02-05T23:10:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [February 5, 2020, 11:10pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/1 "2020-02-05T23:10:35Z")

</div>

Is there a way to get the number of items matched via a Relation (list) to display in a Text component?

(We can already see the items matched in the Data sheet, so I figured the info is there just need to get to it or make it available)?

My use case: I want to display the number of reviews received for a particular item (trying to avoid using formulas in the sheet as much as possible as it is far too laggy)

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [February 5, 2020, 11:21pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/2 "2020-02-05T23:21:33Z")

</div>

Very soon.

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [February 11, 2020, 1:30am UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/3 "2020-02-11T01:30:42Z")

</div>

This is live now, try it!

---

<div class="post-metadata">

**Author:** ![Rogelio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rogelio/32/1054_2.png) [@Rogelio](https://community.glideapps.com/u/Rogelio)\
**Post date:** [February 11, 2020, 2:42am UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/4 "2020-02-11T02:42:26Z")

</div>

Nice one! 🙂 - exactly what I needed in order to show the number of reviews received for a particular Program

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/9/956bc460be63193243c0415ef1044add0ab3fa9d.png)

---

<div class="post-metadata">

**Author:** ![Mrinal\_Chakraborty](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mrinal_chakraborty/32/5239_2.png) [@Mrinal\_Chakraborty](https://community.glideapps.com/u/Mrinal_Chakraborty)\
**Post date:** [April 8, 2020, 6:38pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/5 "2020-04-08T18:38:30Z")

</div>

How it is done, please tell me.

---

<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:** [April 8, 2020, 6:42pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/6 "2020-04-08T18:42:38Z")

</div>

Create a Rollup column against the relation column.

[https://docs.glideapps.com/all/reference/data-editor/computed-columns/rollup](https://docs.glideapps.com/all/reference/data-editor/computed-columns/rollup)

---

<div class="post-metadata">

**Author:** ![Mrinal\_Chakraborty](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mrinal_chakraborty/32/5239_2.png) [@Mrinal\_Chakraborty](https://community.glideapps.com/u/Mrinal_Chakraborty)\
**Post date:** [April 9, 2020, 7:12am UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/7 "2020-04-09T07:12:09Z")

</div>

I want to count number of true or false status in switch columns and number of blank row in that column.  
Tried several option with roll up, it gives total count of true and false without considering blank row. My requirement is to know how many true and how many blank row.  
Please Help.

---

<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:** [April 10, 2020, 10:50pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/8 "2020-04-10T22:50:04Z")

</div>

Can you show a screenshot of what you are trying to do? I think you can do this if you create another If Then column that looks at the switch as well as blank and sets the result to True. Then you can do the rollup against the new If Then column. I’m not sure though if I understand what you want. What do you mean by a blank row? Is it completely blank, or just only some columns are empty? Do you want a count of True, False, and Blank or do you want a count of just True and Blank?

---

<div class="post-metadata">

**Author:** ![Mrinal\_Chakraborty](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mrinal_chakraborty/32/5239_2.png) [@Mrinal\_Chakraborty](https://community.glideapps.com/u/Mrinal_Chakraborty)\
**Post date:** [April 11, 2020, 9:24am UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/9 "2020-04-11T09:24:51Z")

</div>

@Jeff_Hager Earlier it was not working tried all your mentioned way and then applied formula in sheet to achieve that. Today once again tried after your msg and worked absolutely fine. Now deleted additional formula from spreadsheet. Surprisingly seeing no blank data in switch columns, it is either true or false. Thank you for your suggestion.  
Can you please tell me how to make switch data true by default, it is to be used facility management complain tracker, whenever user log a complain by default it should be true and when issue is closed user will have option to switch off, so that it will be recorded as complaint resolved. Presently all check box is by default false.

---

<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:** [April 12, 2020, 3:06pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/10 "2020-04-12T15:06:25Z")

</div>

Here is a response I posted in a different thread:

> [@Change default value of Button to TRUE?](https://community.glideapps.com/t/change-default-value-of-button-to-true/6677/4):
>
> Like @Wiz.Wazeer said, I think you would need to set this with a script in the sheet. Especially if you want it reset every day. An alternative would be to use a form button which would pass along a Column Value of True from another column in the parent record that contains the form button. The True value would be written to the sheet. Then when the user edits the record, the switch would already be set to true. The way Glide is designed, you can’t assign an If Then column to a switch. Unf…

In whatever sheet contains the form button, create a template column and fill the value with ‘true’. In the form, pass that value as a Column value directly to the sheet into your switch column. Later when viewing the complaint, display the switch column as a switch that can then be turned off.

Personally it makes more sense to me to keep the value as false and the set it to true once it’s resolved, but that is only my opinion. I’m sure you have your reasons for making it default to True.

---

<div class="post-metadata">

**Author:** ![arvind](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arvind/32/15962_2.png) [@arvind](https://community.glideapps.com/u/arvind)\
**Post date:** [November 29, 2020, 4:57pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/12 "2020-11-29T16:57:36Z")

</div>

Hi There!

I’ve been trying to use a rollup column to count the number of matches in a relational column. (The relation column is set to find matches between 2 split text columns)

However, when I set up the rollup column - the relational column doesn’t appear as an option. In fact, none of the Relational columns in my sheet appear as options when setting up a Rollup column,

I think my case is almost exactly the same as the one in the link Jeff posted - but are there conditions where relational columns cannot be counted with rollup?

I am trying to break up a search query using split text. Then compare that against an array column with search terms to count how many individual terms match. Do you think this is a feasible way to do this?

Thanks in advance for any help!

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [November 29, 2020, 6:16pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/13 "2020-11-29T18:16:13Z")

</div>

> [@arvind](#):
>
> However, when I set up the rollup column - the relational column doesn’t appear as an option. In fact, none of the Relational columns in my sheet appear as options when setting up a Rollup column,

Is your relation set to `Match multiple`? You cannot roll-up a single relation.

---

<div class="post-metadata">

**Author:** ![arvind](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arvind/32/15962_2.png) [@arvind](https://community.glideapps.com/u/arvind)\
**Post date:** [November 29, 2020, 8:51pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/14 "2020-11-29T20:51:01Z")

</div>

Thanks for the response David!

Yes - I believe the relational column is set to Match Multiple - had tried it both ways - but its set to match mutliple now.

This is a quick screenshot of what I’m trying to do - basically count the number of matches between the Keywords column and U\_Search Query column (which are both split text - could that be the reason?), and the relation is in the Keyword-Search Relation Column. I don’t see that third column as an option when I create a rollup column.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/5/456c08d2dd7ca77d5b91abcde46641824338b576.png)

---

<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:** [November 29, 2020, 10:10pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/15 "2020-11-29T22:10:04Z")

</div>

Just for something to try, can you recreate the relation in a new column and try to create a Rollup on top of that new relation?

---

<div class="post-metadata">

**Author:** ![arvind](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arvind/32/15962_2.png) [@arvind](https://community.glideapps.com/u/arvind)\
**Post date:** [November 29, 2020, 11:02pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/16 "2020-11-29T23:02:27Z")

</div>

Hi Jeff - thanks for helping out!

Just recreated the same relation in a new column and didn’t have any luck (also tried reversing the order of the relation configuration).

When you say create a relation on top of that new relation - which is the second column I should be using in the “on-top” relation - the original relation?

---

<div class="post-metadata">

**Author:** ![arvind](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arvind/32/15962_2.png) [@arvind](https://community.glideapps.com/u/arvind)\
**Post date:** [November 29, 2020, 11:04pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/17 "2020-11-29T23:04:12Z")

</div>

I think I can’t use a relation column as an input to a relation column (please correct me if wrong)? Just want to make sure I’m understanding your suggestion

---

<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:** [November 30, 2020, 12:49am UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/18 "2020-11-30T00:49:05Z")

</div>

Sorry, I meant to say a Rollup (not relation) on top of the new relation. I’ve corrected it.

---

<div class="post-metadata">

**Author:** ![arvind](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arvind/32/15962_2.png) [@arvind](https://community.glideapps.com/u/arvind)\
**Post date:** [November 30, 2020, 1:32pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/19 "2020-11-30T13:32:47Z")

</div>

Got it thanks Jeff! Yes tried that and didn’t have any luck. Any other thoughts would be really appreciated!

Could it be because the two input columns to the relational are in the same sheet? (though I tried relating to a column on a separate sheet but still didn’t have any luck)

This is actually the very last thing I am trying to fix before my app is ready and have spent a few days on it -

Glide has been a truly an amazing tool - everything else in my app works perfectly!

---

<div class="post-metadata">

**Author:** ![arvind](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/arvind/32/15962_2.png) [@arvind](https://community.glideapps.com/u/arvind)\
**Post date:** [December 1, 2020, 12:25pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/20 "2020-12-01T12:25:13Z")

</div>

Just figured out the relation column - but realized the underlying relation setup is not what I wanted.

Can a relation be used to count the number of matches between 2 split text columns? (or is there any . other / better way to do this within Glide?).

As mentioned before - I want to compare the individual words of a search query to keywords and get the number of matches.

---

<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:** [December 1, 2020, 2:09pm UTC](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302/21 "2020-12-01T14:09:50Z")

</div>

Are you trying to have a count of rows that have a match or are you trying to count each individual match within the same row?

[Next page](https://community.glideapps.com/t/display-the-count-of-items-matched-in-a-relation-list/4302.md?page=2)
