# Need help with Logic to retain values present in Multiple files column on some action

**URL:** https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719
**Category:** Ask for Help
**Created:** [April 19, 2024, 6:56am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719 "2024-04-19T06:56:24Z")
**Posts on this page:** 15
**Page:** 1

<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, 6:56am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/1 "2024-04-19T06:56:24Z")

</div>

Hi Guys,

I have a multiple files column where I am writing down some ID’s on particular action.

I get the values for this from User Table.

Now when I try inputting value to the same cell with newer ID’s the older ID’s are being overwritten with new values.

Is there anyway I can keep the existing value and then write new values on top of it?

**Its a Multiple file column**

Thank you in advance

Regards,  
Dilip

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 19, 2024, 7:42am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/2 "2024-04-19T07:42:18Z")

</div>

Use a Make Array column to create a new array from the existing Multiple Files column and the values that you want to add. Then use a Set Column Values action to write the values from the Make Array column into the Multiple Files column.

Haven’t we answered this question - or variations of it - several times already?

---

<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, 10:15am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/3 "2024-04-19T10:15:33Z")

</div>

Hi Darren, thank you for the reply.

> [@Darren\_Murphy](#):
>
> Use a Make Array column to create a new array from the existing Multiple Files column and the values that you want to add. Then use a Set Column Values action to write the values from the Make Array column into the Multiple Files column.

Yes this has been discussed and this is what I have done.

but there is a corner case to this. Which is:

I set values to multiple files column in campaign table from the users table. User table is fed data from the make array column in creators table.

When I reset values and then add new values to the same campaign, it replaces all other values present with the new values.

it does not retain the previous values added.

That’s one corner case which I want to address.

Hence was wondering if there is way where we can add to existing multiple files column new values that are selected without replacing older values.

Regards,  
Dilip

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 19, 2024, 10:23am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/4 "2024-04-19T10:23:06Z")

</div>

Sorry, I don’t understand.

> [@Dilip\_Adiga](#):
>
> When I reset values and then add new values to the same campaign, it replaces all other values present with the new values.
> 
> it does not retain the previous values added.

That just tells me that you’re applying the technique incorrectly.

---

<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, 10:32am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/5 "2024-04-19T10:32:04Z")

</div>

Firstly thank you for your patience answering my question.

Here is what I am doing :

I select creators I add them to Make array column and remove creators on de-selection by using remove elements column.

 ![Screenshot 2024-04-19 at 3.55.27 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/5/152147ce122636c46ae648a443411fc84b862126.jpeg)

Then I write this value to under table Multiple file column, where I write all the selected creators value.

On click of a button in my front end, I send the selected creators from User table to Multiple files column in Campaigns table.

The flow till here works fine

 ![Screenshot 2024-04-19 at 3.56.52 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/8/f851776b49b576419c8136e6a063a79bb77cd1aa.jpeg)

Now Imagine I sent few creators to a campaign EX: A ,B and C to campaign A

I clicked on Reset button which cleared the values of selected creators from table.

Now when I select creator D, E and F and move it to same campaign

It deletes A, B and C and writes only D, E and F in to the multiple files column in campaigns table

**I know that it is happening because My logic defines it to overwrite new entry**

How do I modify this logic? Or is there some hack I can use where it adds new creators if more are selected and adds them to this list

Sorry maybe I sound dumb but just too cluttered right now.

Regards,  
Dilip

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 19, 2024, 10:37am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/6 "2024-04-19T10:37:53Z")

</div>

> [@Dilip\_Adiga](#):
>
> Now when I select creator D, E and F and move it to same campaign
> 
> It deletes A, B and C and writes only D, E and F in to the multiple files column in campaigns table

You should have a Make Array column that contains the existing contents (A,B,C), plus the newly selected values (D,E,F) to give you an array with 6 items. Then write that.

---

<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, 11:04am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/7 "2024-04-19T11:04:27Z")

</div>

Hi Darren,

Sorry maybe I am stupid.

I configured the make Array column to Have existing values from my Multiple file column

A,B,C and Newly selected Items from Selected Column from user table Which has D,E, F which writes fine

 ![Screenshot 2024-04-19 at 4.30.33 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/5/f5f52c2acb18dc972ab2ac9fcecc05b01483c444.jpeg)

When I press reset button All selections are removed

Now When I press Copy to Campaign button

The Multiple files column containing A, B, C are reset to 0

and new elected value is Obtained as expected but reset removes the previous selection.

**Reason I need reset is because**

I save filtered creators in a list

Ill have multiple saved List,

Ill have multiple campaigns → if I dont have reset to reset all selections then people selected in other list who are not relevant will be added to other campaigns when I shift between campaigns.

Please let me know if I am complicating it here.

Regards,  
Dilip

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 19, 2024, 11:19am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/8 "2024-04-19T11:19:15Z")

</div>

Maybe you need a second Make 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 19, 2024, 11:21am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/9 "2024-04-19T11:21:32Z")

</div>

Exactly, So if I need to keep making iterations like this, I might need second, third , fourth array columns right?

Is that a right approach or is there a better way?

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, 11:53am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/10 "2024-04-19T11:53:03Z")

</div>

Am I thinking wrongly @Darren_Murphy ?

Regards,  
Dilip

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 19, 2024, 11:59am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/11 "2024-04-19T11:59:43Z")

</div>

I honestly don’t know. I always get confused when I try to follow your posts. I think I’m getting old…  
Bottom line, there are usually several ways to get a job done with Glide. Just do what works.

---

<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 22, 2024, 4:14am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/12 "2024-04-22T04:14:51Z")

</div>

Hi Darren,

> [@Darren\_Murphy](#):
>
> I always get confused when I try to follow your posts. I think I’m getting old…

Sorry about that, maybe I confuse you with long posts.

Is my assumption right that whenever I write multiple ID’s to Make array column or Multiple files column it over writes previous entries?

Regards,  
Dilip

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 22, 2024, 4:19am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/13 "2024-04-22T04:19:35Z")

</div>

Multiple Files column - yes, if you use a Set Column Values then whatever is there will be replaced.  
Make Array column - is a computed column. The only way to change it is to change whichever column or columns it uses as a source.

---

<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 26, 2024, 3:45am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/14 "2024-04-26T03:45:04Z")

</div>

Hi Darren,

I could solve the issue. I had to create Lookup and Make array column in user table

and then Add this to the action where I click on “Copy to Campaigns” button.

Thank you for your help.

@Himaladin thank you for your help too.

Regards,  
Dilip

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [May 3, 2024, 3:46am UTC](https://community.glideapps.com/t/need-help-with-logic-to-retain-values-present-in-multiple-files-column-on-some-action/72719/15 "2024-05-03T03:46:00Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
