# Need help in preventing removing array data saved in array column and rewriting it with new selected items

**URL:** <https://community.glideapps.com/t/need-help-in-preventing-removing-array-data-saved-in-array-column-and-rewriting-it-with-new-selected-items/72589>\
**Category:** Ask for Help\
**Created:** [April 15, 2024, 9:11am UTC](https://community.glideapps.com/t/need-help-in-preventing-removing-array-data-saved-in-array-column-and-rewriting-it-with-new-selected-items/72589 "2024-04-15T09:11:48Z")\
**Posts on this page:** 7\
**Page:** 3

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [April 17, 2024, 5:24am UTC](https://community.glideapps.com/t/need-help-in-preventing-removing-array-data-saved-in-array-column-and-rewriting-it-with-new-selected-items/72589/41 "2024-04-17T05:24:11Z")

</div>

Earlier, I noticed that you were using JSON to store previous data, and perhaps it needs attention regarding its functionality compared to your “selectedCreators” array column.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [April 17, 2024, 5:46am UTC](https://community.glideapps.com/t/need-help-in-preventing-removing-array-data-saved-in-array-column-and-rewriting-it-with-new-selected-items/72589/42 "2024-04-17T05:46:33Z")

</div>

> [@Himaladin](#):
>
> Yes, essentially you can pull arrays into all tables using the “single value” column that I showed earlier.

I tried applying single value column to my “Multiple File Column” in Campaigns table. I dont think it’ll work as all values are copied into single row. meaning all rows will have same values.

> [@Himaladin](#):
>
> If you’re willing to try tweaking the button actions and columns from various angles, or creating a set of double value columns, I’m sure it can work. The key is, your “selectedCreators” array column hasn’t been utilized yet

Let me try something around here. Ill experiment a bit

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [April 17, 2024, 5:47am UTC](https://community.glideapps.com/t/need-help-in-preventing-removing-array-data-saved-in-array-column-and-rewriting-it-with-new-selected-items/72589/43 "2024-04-17T05:47:21Z")

</div>

Hi Himaldin,

This was done only to filter data, I followed on of Marco’s video so that I can do select all after filter.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [April 17, 2024, 3:27pm UTC](https://community.glideapps.com/t/need-help-in-preventing-removing-array-data-saved-in-array-column-and-rewriting-it-with-new-selected-items/72589/44 "2024-04-17T15:27:57Z")

</div>

Dilip, upon further observation of your application, I’m puzzled by your need for a trebuchet method when you already have the same functionality with the “All Creator” JSON column in your user table. The only difference between them is the data format, one being an array and the other a JSON joint list.

Regardless of your intentions, I’d like to point out that your SaveQuery collection component is actually writing directly to the data in the user sheet. After I made some modifications to the “Add and Clear” actions and the array column in your creator sheet, every check or uncheck action can update the data in the user sheet as an array.

 ![Screenshot 2024-04-17 at 22.09.29](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/c/7c4af208547d88240df962f9822a2c2c24f082f5.jpeg)

 ![Screenshot 2024-04-17 at 22.10.29](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/7/4766a2eac59ebd1fef82af6f8b9b617b2feb9c01.jpeg)

 ![Screenshot 2024-04-17 at 22.10.46](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/9/b91ed8038446220af0837f19a44e740e997923ca.jpeg)

 ![Screenshot 2024-04-17 at 22.11.07](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/2/92e29504846ee2df80e946598bd82ecfd1809d3f.jpeg)

 ![Screenshot 2024-04-17 at 22.12.12](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/3/b3e4771a2b954e4663109221f3d52bc45865dc57.jpeg)

 ![Screenshot 2024-04-17 at 22.12.24](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/b/6b25679d481fd9bba870489aa6662d506560cc9a.jpeg)

Upon reexamining your application, I noticed that your reset button has changed, but considering that you can already update the data through checking or unchecking items in your collection query, I don’t see the need for the reset button anymore.

I apologize for being in a rush; there may be imperfections. Hopefully, you can refine it further. I hope this is helpful and can help resolve your issues.

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [April 18, 2024, 4:24am UTC](https://community.glideapps.com/t/need-help-in-preventing-removing-array-data-saved-in-array-column-and-rewriting-it-with-new-selected-items/72589/45 "2024-04-18T04:24:27Z")

</div>

Thank you for your solution and reply Himaldin. I am away from work today. I will check your solution in the evening today and get back.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Dilip\_Adiga](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilip_adiga/32/60330_2.png) [@Dilip\_Adiga](https://community.glideapps.com/u/Dilip_Adiga)\
**Post date:** [April 19, 2024, 4:30am UTC](https://community.glideapps.com/t/need-help-in-preventing-removing-array-data-saved-in-array-column-and-rewriting-it-with-new-selected-items/72589/46 "2024-04-19T04:30:41Z")

</div>

Hi Himaldin,

Firstly Thank you for sending me the solution. Really appreciate it.

Here is what I think

Removing element column already exists in my app where I am removing unselected creators.

I am not sure this would work because How will be able to manipulate the selection from Campaigns table?

If you see my campaigns table, It has All selected creators. The input to that is Selected creators from Users table.

It will work for first time, After that when we try adding more creators is where the problem lies.

I think even in your approach it wont work, **It wont compound previous selected values and then add new selections in campaigns table right.?**

Correct me if I did anything wrong.

Regards,  
Dilip

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [April 19, 2024, 9:49am UTC](https://community.glideapps.com/t/need-help-in-preventing-removing-array-data-saved-in-array-column-and-rewriting-it-with-new-selected-items/72589/47 "2024-04-19T09:49:13Z")

</div>

> [@Dilip\_Adiga](#):
>
> I am not sure this would work because How will be able to manipulate the selection from Campaigns table?

This is another case. What I showed above is how it works on the “Search Saved” side. If you already have at least 2 tables that contain array data, namely the user table and the creator table, then all you have to do is build a relation (relSelectedCampaign) and add it to your “Add and clear” action, and so on if there are other tables.

 ![Screenshot 2024-04-19 at 15.54.09](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/e/aee0899e6232bf2fffe9e9f465e3b8391b4b1bc2.png)

> [@Dilip\_Adiga](#):
>
> It will work for first time, After that when we try adding more creators is where the problem lies.

I couldn’t find where you add new creators in your app design. Maybe you can do the same as before to add them to the user column. Here, I am still confused about which method you will use.

[Previous page](https://community.glideapps.com/t/need-help-in-preventing-removing-array-data-saved-in-array-column-and-rewriting-it-with-new-selected-items/72589.md?page=2)
