# Help! automatic count columns

**URL:** <https://community.glideapps.com/t/help-automatic-count-columns/47229>\
**Category:** Ask for Help\
**Created:** [August 19, 2022, 12:41pm UTC](https://community.glideapps.com/t/help-automatic-count-columns/47229 "2022-08-19T12:41:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [August 19, 2022, 2:36pm UTC](https://community.glideapps.com/t/help-automatic-count-columns/47229/2 "2022-08-19T14:36:54Z")

</div>

Hola!,

I think this [solution](https://community.glideapps.com/t/count-duplicate-elements-in-an-array-or-list/41313) applies to your case.

Here my step by step:

1- You have something like this, an _Answer List_ table to save your answers

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/b/3b4c66ad6de8d43b7bf1f03270563465c0f91544.png)

2- and another table where you set up your answers to have a kind of order/definitions  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/9/4951d696cc9a482f723406ca4f2d2419efad4d5f.png)

3- The trick is to bring all answers (one by one) to this table and create a list by using a Joined List column,

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

when your will have 3 answers lists in the table, the screen should look like this:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/2/320a264099369a1958c6e2a11165a13596463372.png)

4- Now, create a new column using the Template type to merge 3 previous answer lists and have a single and larger answer list:

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

1. finally, we need to use a small JS code to avoid creating more columns and got the final results you are looking for!

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/3/734dfc248ae67c33d85c3c00cb02260b5ca30292.png)

the JS code is this:

```auto
const arr=p1.split(",")
x= arr.filter(function(valor) {
       return valor == p2;
      }).length 
return x

```

I suppose that another no-code idea/solution (100% pure) can be used here but this is very efficient and quick to avoid creating many columns.

Espero te sirva y puedas seguir avanzando en tu APP!

Saludos @Priscilla_Garcez

---

_[View the full topic](https://community.glideapps.com/t/help-automatic-count-columns/47229)._
