# Uncheck column of checkboxex

**URL:** <https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520>\
**Category:** Ask for Help\
**Created:** [May 20, 2020, 9:35pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520 "2020-05-20T21:35:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pipharvester](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pipharvester/32/61697_2.png) [@pipharvester](https://community.glideapps.com/u/pipharvester)\
**Post date:** [May 20, 2020, 9:35pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/1 "2020-05-20T21:35:24Z")

</div>

I have a sheet with a column of checkboxes. They can be set individually in my app but I want an “Admin” to be able to click on a “Clear All” button or switch and have them all unchecked. I tried several different things and so far unsuccessful but I am sure I am making it far more difficult than necessary (which is my standard MO) so appreciate any assists!

Jerry

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 20, 2020, 10:07pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/2 "2020-05-20T22:07:38Z")

</div>

I wanted the same thing as well but that functionality does not exist. I assume the checkboxes are user specific? If so, an admin cannot see the user values anyway and thus cannot clear them

---

<div class="post-metadata">

**Author:** ![pipharvester](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pipharvester/32/61697_2.png) [@pipharvester](https://community.glideapps.com/u/pipharvester)\
**Post date:** [May 21, 2020, 4:07am UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/3 "2020-05-21T04:07:11Z")

</div>

Actually Robert they are check boxes that indicate which rows will be included in an alert to be sent and they are set by the admin only and could have 1 - 20 set and wanted to be able to uncheck them all to start a new day…thanks for replying!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [May 21, 2020, 11:04am UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/4 "2020-05-21T11:04:38Z")

</div>

Could you instead create a script to clear them via a time trigger every morning?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 21, 2020, 11:36am UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/5 "2020-05-21T11:36:18Z")

</div>

Somebody said scripts here. Do you need my help to set up one @pipharvester?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 21, 2020, 12:27pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/6 "2020-05-21T12:27:16Z")

</div>

Here’s how it would work.

![ezgif-1-77f1a6631725](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/6/6be8c3769401c9fb68e8a709a3320f4518f59b09.gif)

The script for this:

```
function SetCheckbox() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Checkboxes');
var dataRange = sheet.getRange('A2:A');
var values = dataRange.getValues();
for (var i = 0; i < values.length; i++) {
  for (var j = 0; j < values[i].length; j++) {
if (values[i][j] == true) {
  values[i][j] = false;
}
  }
}
dataRange.setValues(values);}

```

What you need to change:

- getSheetByName(‘Checkboxes’) =\> Change Checkboxes to your sheet name that contains the checkboxes.
- sheet.getRange(‘A2:A’) =\> Change the A2:A range to your checkbox range.

Navigate to current project’s triggers and setup like I show in the video, change the time to run as you wish.

---

<div class="post-metadata">

**Author:** ![pipharvester](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pipharvester/32/61697_2.png) [@pipharvester](https://community.glideapps.com/u/pipharvester)\
**Post date:** [May 21, 2020, 2:01pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/7 "2020-05-21T14:01:57Z")

</div>

Well once again this forum proves to be one of the most selfless and helpful ones I have ever been part of. You are all very attentive and helpful! Thank you @Robert_Petitto and @ThinhDinh for your attention and time! Blessings to you both!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 21, 2020, 2:02pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/8 "2020-05-21T14:02:57Z")

</div>

Blessings to you as well! Feel free to ask us whenever you need.

---

<div class="post-metadata">

**Author:** ![pipharvester](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pipharvester/32/61697_2.png) [@pipharvester](https://community.glideapps.com/u/pipharvester)\
**Post date:** [May 21, 2020, 3:17pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/9 "2020-05-21T15:17:21Z")

</div>

Worked flawlessly!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 21, 2020, 3:20pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/10 "2020-05-21T15:20:20Z")

</div>

Lovely. Make sure you set the trigger to the time you want it to run, from then on it’s automatically run daily.

---

<div class="post-metadata">

**Author:** ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)\
**Post date:** [May 21, 2020, 5:29pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/11 "2020-05-21T17:29:28Z")

</div>

O vídeo não estar reproduzindo!

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 22, 2020, 12:36am UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/12 "2020-05-22T00:36:22Z")

</div>

I have uploaded a new GIF, hope it helps!

---

<div class="post-metadata">

**Author:** ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)\
**Post date:** [May 22, 2020, 11:42am UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/13 "2020-05-22T11:42:20Z")

</div>

Olá, obrigado @ThinhDinh , esse deu para eu visualizar perfeitamente. Apesar de eu não ter conseguido executar o script, deu erro aqui pra mim… O meu caso de uso seria de dentro do app acionar o checkbox, e na planilha ele estivesse atrelado a um script programado para apagar certa quantidade de linha ☹

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 22, 2020, 12:00pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/14 "2020-05-22T12:00:09Z")

</div>

Sorry I can’t speak Portuguese/Spanish. I used Google Translate, so you want a script that is programmed to erase a certain amount of line. How many lines, and how exactly do you want to trigger it?

---

<div class="post-metadata">

**Author:** ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)\
**Post date:** [May 22, 2020, 12:08pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/15 "2020-05-22T12:08:22Z")

</div>

Umas 100 linhas

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 22, 2020, 12:21pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/16 "2020-05-22T12:21:57Z")

</div>

So let me summarize it, you want to trigger a checkbox from Glide, that will delete 100 lines from a sheet.

Do you want to delete them, or just clear their content? And is it the same range of lines every time (let’s say A2:A101)?

---

<div class="post-metadata">

**Author:** ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)\
**Post date:** [May 22, 2020, 12:25pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/17 "2020-05-22T12:25:02Z")

</div>

Sim, sempre o mesmo intervalo de linhas, e é excluir elas mesmo.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 22, 2020, 12:26pm UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/18 "2020-05-22T12:26:26Z")

</div>

Is the “trigger” checkbox in the same sheet as the lines that need to be deleted, or in a different sheet?

---

<div class="post-metadata">

**Author:** ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)\
**Post date:** [May 23, 2020, 2:12am UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/19 "2020-05-23T02:12:16Z")

</div>

A caixa de seleção estar na mesma planilha, na coluna “H”.

Preciso que somente as linhas venham a ser excluídas quando selecionado o checkbox de A2:A100

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 23, 2020, 2:45am UTC](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520/20 "2020-05-23T02:45:09Z")

</div>

So a checkbox in column H will clear all the values from A2:A100 upon selection in Glide?

[Next page](https://community.glideapps.com/t/uncheck-column-of-checkboxex/9520.md?page=2)
