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

Hi Guys,

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

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

Campaigns Table

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

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

@Darren_Murphy any suggestion you give me on this?

Regards,
Dilip

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?

Thank you for replying,

Sorry, my wordings might have been confusing,

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

Regards,
Dilip

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.

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.

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

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