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

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

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?

1 Like

Hi Darren, thank you for the reply.

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

Sorry, I don’t understand.

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

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.

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

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

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.

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

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

Maybe you need a second Make Array column?

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

Am I thinking wrongly @Darren_Murphy ?

Regards,
Dilip

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.

1 Like

Hi Darren,

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

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.

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

1 Like

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