# Need help to remove one item from Array coming out of Trebutche method

**URL:** https://community.glideapps.com/t/need-help-to-remove-one-item-from-array-coming-out-of-trebutche-method/72476
**Category:** Ask for Help
**Created:** [April 11, 2024, 5:05am UTC](https://community.glideapps.com/t/need-help-to-remove-one-item-from-array-coming-out-of-trebutche-method/72476 "2024-04-11T05:05:08Z")
**Posts on this page:** 7
**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 11, 2024, 5:05am UTC](https://community.glideapps.com/t/need-help-to-remove-one-item-from-array-coming-out-of-trebutche-method/72476/1 "2024-04-11T05:05:08Z")

</div>

Hi Guys,

I have a multiple files coming in User table based on selection/deselection of users in my creators table

 ![Screenshot 2024-04-11 at 10.24.06 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/0/4064a1e6312ca96b390bfd4e470598129a7f48f3.jpeg)

I click select a campaign name from UI and click Save → it saves the result Array in campaign table

Campaigns Table

 ![Screenshot 2024-04-11 at 9.34.15 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/3/338e308112d8a17a55398d583b09ebda707d8346.jpeg)

Red circled portion is selected creators obtained from User Table

I do a relation with creators table and Display the selected creators in the collection in the UI

**UI where I show**

 ![Screenshot 2024-04-11 at 10.33.08 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/6/8686e6c2bde76e00c6c4be1c0f70013ebafb6a92.jpeg)

In this when I click on reject button it should remove the creators from that List

How do I do this? I tried applying trebuche method again on the List, it doesn’t work for my use case

Any suggestions or recommendations?

Thank you in advance.

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 11, 2024, 5:55am UTC](https://community.glideapps.com/t/need-help-to-remove-one-item-from-array-coming-out-of-trebutche-method/72476/2 "2024-04-11T05:55:56Z")

</div>

@Darren_Murphy any suggestion you give me on this?

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 11, 2024, 6:00am UTC](https://community.glideapps.com/t/need-help-to-remove-one-item-from-array-coming-out-of-trebutche-method/72476/3 "2024-04-11T06:00:08Z")

</div>

> [@Dilip\_Adiga](#):
>
> In this when I click on reject button it should remove the creators from that List

This is confusing. You have a collection item action that will operate on a single item in the collection. But you say you want the action to remove creators (plural) - is that really your intention, that selecting any item in the collection will remove EVERY item in the collection?

---

<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 11, 2024, 6:03am UTC](https://community.glideapps.com/t/need-help-to-remove-one-item-from-array-coming-out-of-trebutche-method/72476/4 "2024-04-11T06:03:56Z")

</div>

Thank you for replying,

Sorry, my wordings might have been confusing,

Selecting “Remove Creators” should only remove that creator . not all.

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 11, 2024, 6:16am UTC](https://community.glideapps.com/t/need-help-to-remove-one-item-from-array-coming-out-of-trebutche-method/72476/5 "2024-04-11T06:16:22Z")

</div>

Okay.

So the thing to understand here is that any actions on that collection will be attached to the Creators table, because that’s where the collection is sourced from. So you need to create the removal logic in that table.

So here is what you could do:

- Your first screen shot looks like it is a Campaign Details screen. What you should do is modify the action that opens that screen so that it first writes the Campaign RowID into a column in your User Profile row. This way you will know which campaign you are looking at, and you can use that in other tables.
- In your Creators table, create the following:  
– A Template column that contains the above value from your User Profile row  
– A single relation column that matches the CampaignID in the template column with the same value in the Campaigns table  
– A lookup column that fetches the Selected Creators Array via the single relation.  
– Now you can apply trebuchet. Add a remove element column that removes the creator RowID from the array.  
– And finally, configure the action. It should do a set column values, via the single relation back to the Campaigns table, to update the array with the result of the remove element 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 11, 2024, 6:50am UTC](https://community.glideapps.com/t/need-help-to-remove-one-item-from-array-coming-out-of-trebutche-method/72476/6 "2024-04-11T06:50:13Z")

</div>

Hi Darren,

thank you soo much for helping me out here. I am just amazed how you could think of such a solution. Lot to learn for me personally.

Thank you.

> [@Darren\_Murphy](#):
>
> – Now you can apply trebuchet. Add a remove element column that removes the creator RowID from the array.

When I select “Reject Creators” I am storing the ID of the creator in User table to reference it for my remove element column. I hope that is ok to do?

I will test this solution out now.

Thank you again.

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: [April 18, 2024, 6:50am UTC](https://community.glideapps.com/t/need-help-to-remove-one-item-from-array-coming-out-of-trebutche-method/72476/7 "2024-04-18T06:50:18Z")

</div>

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