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

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.

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.

Let me try something around here. Ill experiment a bit

Regards,
Dilip

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

1 Like

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.

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.

3 Likes

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

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

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.

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.