Need help on how to do Select all items of collection

Hey Guys,

thank you guys for amazing help you guys provide.

Recently @Darren_Murphy was very kind enough to provide me with solution for one of my issues where I had to select few creators name from the list and move them to a selected campaign. it works like a charm.

I however had a requirement where now there will be filters to display collection items. Filters can be 1 or 2 or 3. Once the filters are applied ill get say a list of 20 items

I need to have a button called Select All which will select all the items in the List after filter is applied

Basically I would want to give user an option to select all elements in one click and send them to required destination.

Is there a way to do it?

Thank you in Advance for your help.

Regards,
Dilip

Could you please provide more details so it’s easier to assist? Screenshots and brief description of your data structure data would be really helpful

1 Like

Hi Tuzin,

Thank you for replying

I created this app template based on Darren’s working suggestion

Click on the Creator tab at the button You will see test and test1

You can select or deselect by clicking on the tick mark

And select the campaign name and move it to the campaigns tab.

Campaigns can be created and found from campaigns tab at the bottom.

Let me know if this was of any help.

I need a button which lets me select both test and test1 with single click.

Because if I have more than 1000 creators I dont want to individually click 1000 times.

Regards,
Dilip

I think you’d need to approach it a bit differently in order to achieve multi select. Right now when you select a creator, the creator’s ID is written into a column in its row. You can have an array of selected IDs in the user’s profile and rewire the logic in the creators table so that any creator is considered selected if its ID is contained in the user’s array. This way you would be able to create a button that simply writes the results of a lookup of all creator IDs into the user’s array

2 Likes

What if I have 100 creators and I apply filter which gives me 50 creators.

When I click button will it only select the 50 filtered and send it?

Regards,
Dilip

I think I would want the button to Select all available after filtering to be selected

rather than doing it individually

Regards,
Dilip

Then you have to use a lookup of all IDs from a Query that only returns rows that pass through your filter

Can I use the functionality of select/unselect if I do this?

Also by filters I meant the in App filters given by glide.

I mean there might be a scenario where I might want to remove 2 from the filtered 50 creators.

How can I tackle that?

Regards,
Dilip

Hi ,

I tried many ways but failed to understand how can using in app filter show only elements present on a screen

And on single click of a button turn all those to selected state and move to campaigns.

Would appreciate any help guys.

Thank you again.

Regards,
Dilip

I read a very old post by a user

Is joined list something I can consider?

My Idea is :

Ill give a switch —> connect it to a button Select all

Once the filter elements are shown

Ill click on select all button.

It should write all values to Joined list —

Will this approach work after I narrow down creator names after using inline filter and then de-selecting few from that?

Will I be able to move only the creator names shown into joined list? if yes how?

PS: I want this to happen on collection list items not choice component

Thank you guys in advance.

Regards,
Dilip

Do you mean select all on a native filter, not a custom filter with a choice component?

If that’s the case, I don’t think that’s possible.

Thank you for the reply ThinhDinh

Yeah I realised that In Native filter it wont work.

I am ok with using custom filter.

I tried using JS, but somehow failed in getting required results.

Would you be able to guide me with any solution.

Regards,
Dilip

@Darren_Murphy I made this work combining two solutions.

1 solution from Marco where I filter data and store it

  1. using your solution of POC you had showed me. It works well.

This is what I did.

I have a doubt thought. I create a campaign where I have stored creators. A B and C

Now I come back to my Main List and clear all values and then Select D , E and F, if I move them to the same List, its removing A B and C and only adding D E and F

Also if I create a new campaign and without re setting the values select 1 creator and move them to any campaign it also sends the other preselected values to the campaign.

anyways I can prevent this from happening?

Thank you in advance for your help.

Regards,
Dilip