How to remove single item from an array?

Hi Guys,

I have an array of items consisting of row ID’s

I want to be able to remove only the Selected Items ID from that array only.

How can I do it?

Regards,
Dilip

Use the “Remove Elements” column: Computed > Experimental > Array > Remove Element/Remove Elements.

Thank you for the reply Himaladin.

This approach will work if the ID for the element you want to remove is in the same table.

In my case

My creators are in separate table.

In the table UI where I want to remove element from Array are in different table.

For reference

I want to remove elements from encircled array

But the elements with these ID’s are stored in different table.

How can I handle this?

Regards,
Dilip

Use lookup to retrieve the RowID to your array page for removal.

Hi Himaldin,

I am able to do look up on the red coloured circled portion

and retrieve the ID’s of the selected once

When I create the remove element column

In values ill list all the selected one that is the look up column

WHat should I put in “To Remove”?

Regards,
Dilip

Is “New Column” the ID you want to subtract from the All Selected Creator column?

Thank you for the reply Himaldin

No it is not.

How do I get ID of the creator I want to remove?

Lets say I have J, M , and O selected

IN DB

Suppose I want to remove J I click on it and select Reject

What should I do? Should I write the ID of the creator somewhere? What if I select multiple?

Regards,
Dilip

Your case is similar to the trebuchet from @Robert_Petitto’s video. Maybe you can watch it again, because the process is quite complicated to explain.

Oh I followed the same video.

Thing is

I have done it on Creator List once Where I select few and de-select few

This is where I apply first time

Add creator will select all Gren coloured ones. When I click on it again it removes from the List

Now I am moving it to another List from here by clicking on Copy to campaign. → I require this flow for the app

It moves the array of creators to another table.

That’s the table I showed where it was showing List of selected creators.

How do I try apply trebuchet method there?

That’s what I am not able to understand.

Regards,
Dilip

I think a layer of complication comes because I applied the trebuchet method on the creators List already

and I am copying the Array to another table in my case.

I am confused as to how to add it again because I am displaying relation column values in the List

Regards,
Dilip

Sorry, I’m not at the computer right now, so I can’t see clearly on my mobile. We’re all on holiday here. :smile:
I just assumed that your “All Selected Creator column” is the same as the items column added in the video. And you need to add the new subtract-items column as in the video. From these two columns, you can link them with your “Accept” or “Reject” button. However, you need a helper table, which is the user table, which I think you already have.
Hope this helps.

Hi Himaldin,

Oh ok. Happy Eid Festival to you.

Well I got what you said and I follow it.

Problem is I am displaying the resultant of the first trebuchet method in UI, that is my

All selected creator and relCreators relation shown in screenshot

I am now displaying the result of relCreators in a List

and now by principle I should do trebuchet method on this List.

How will it help me remove selected option from relCreators in my case?

Thank you for all the help you guys provide.

Regards,
Dilip

My confusion is in the second layer of trebuchet method as it is applied on the resultant of the first.

Its a list view

How can I remove creators from that and still display the removed item in same result as first?

Because I am displaying the same result in the list right?

Regards,
Dilip

Thank you, I don’t celebrate Eid, but I just enjoy the holiday.

What happens if you connect the relation column with the array column in the user table (I’m still referring to the method in the video), is the result the same?

ok the difference is the resultant multiple files from user table I am setting into an array in campaigns table.

Its done on action.

So all selected creators are set to campaigns table on action.

Now I need to remove one or two creators from this array in campaigns table.

WHat I thought

I tried re-doing the trebuchet method again from scratch for campaigns table. Meaning doing the process again for resultant of the first one

But it fails when I reach displaying the result on the list.

Not sure how can I approach this.

**All I need is to be able to just remove one or two selected creators from the trebuchet result list displayed in campaigns table **

PS: campaigns table array is got from user table multiple file column
Regards,
Dilip

You are close, and I believe you can do it. Try even harder. :muscle:

Let me try figuring it out today.

Regards,
Dilip

1 Like

Hi Himaldin, I tried applying Trebutche method on the resultant of first one. I dont think it works for my use case.

Regards,
Dilip

Are you trying to subtract the “All selected creators” column from your “relCreators” column? Just to clarify, array columns can only be subtracted from other array columns. Relation columns are just relations and do not contain material or data.
I see you’ve opened a new topic. Hopefully, someone can assist you. I apologize.

try something like this