I have a requirement where I need to be able to select multiple items from the Listview
Maybe like a check box or something
Need to have a button called “Move” when this happens it should ask for a Pop up where I should be able to enter a value “ABC” → and then it should move the value to Table B and in one column A this value should be written for all moved items.
Is this something that can be achieved in glide?
My approach which I want to try is have a checklist for Listview → have a checkbox in UI for each item selected enabled or disabled.
Basically I need to be able to select few rows from my list view.
If I have 5 row in my collection.
I should be able to select 3 rows randomly in no particular order —> have a pop up come and be able to enter a value → move only these 3 selected rows to a different table.
Yes, as @Himaladin says, you would need to use the API for this - if you want to move them all at once and you have no way of knowing in advance which or how many will be selected.
A much simpler option would be to move them one at a time with a custom item click action, perhaps with an intermediary confirmation screen. So something like this:
Item click → Show New Screen → This item
– Confirm Move?
— Yes:
---- Add Row to secondary table
---- Delete Row → This item
---- Close Overlay
— No:
---- Close Overlay
Moving single items would be tedious for my end users. Let me explain in detail.
We have a table where we have list of creators with different values describing things about each creators These values are set in each columns for creators.
We create new campaigns which is stored in another table.
Team members will come back to the Creators table and Will need to select Multiple creators from the list, it can be selecting 50-100 creators.
We need to show these creators selected to campaign managers
So my idea is End user selects 50-100 creators → when move button is clicked its ask for user to enter campaign name → user enters it and then the data is moved to new table → where against each data moved well have the campaign name entered.
The reason I am saying we need to enter campaign name is because I can show to the brand manager the selected values in their end app.
Does this give better clarity ?
Let me know if logs I am explaining or using is right? Or is there any other better way to do this?
I’m not sure why you even need to move them at all?
Wanting to move data from one table to another is usually a big red flag that indicates the data structure hasn’t been thought out very well.
In this case, it seems to me that you could simply leave the rows where they are, and instead set an attribute in a column that associates them with the selected campaign. If creators can be associated with multiple campaigns, then that’s fine, you just store the campaign references as an array.
But either way, there is no current way to perform bulk actions without using the Glide API.
So your choices are either use the API, or operate on them one at a time. There is no other way.
In your Campaigns table, create a Multiple Files column. This will be used to store an array of Creator IDs representing all those associated with each specific campaign.
In your User Profiles table, create a similar Multiple Files column. This will be used to temporarily store the CreatorIDs
In your Creators table, create a Make Array column that combines the previous column with the RowID of each Creator row.
As the user is navigating to the selection screen, use an action to clear the value in the user profile row
On your Collection, modify your Item Click action so it takes the value from the Make Array column and writes it to the multiple files column in the User Profile
Then once the user has finished making their selections, use an action to take the value from the multiple files column in the user profile row, and write it to the multiple files column in the Campaigns table.
You can then relate that column back to your Creators table, and you will have a list of all Creators associated with each Campaign.
200 campaigns per creator using this method is not a problem. If you had a hundred thousand, it might be.
I already have an action created in my creators listing screen, As you can see in screenshot above The list view is a checklist and It has a click configured to show details screen on item click.
The creator tab selected here is the selection screen.
How do I set action for this?
I am little confused here. Can you please help me out?
You can either modify that action, or use a collection item action.
You can’t, unless you’re using an action to navigate to that tab.
What you could do is convert it to a custom layout, and then have the collection initially hidden. Then use an action to expose it and at the same time clear the value in the user profile. There are lots of ways you could deal with this, but taht’s just one way that comes to mind.
From a pure User experience perspective what do you recommend I do? While for clearing item I might just say do it one time on one item so that I clears the value from user table. Which would still be ok.
But
Also one more doubt being
Can we “Check” multiple items and then configure action to move these selected items?
Because if I have to click each item then it kind of defeats my purpose.
as sometimes I might have to click on 200 items right , Rather checking 200 items and moving would be easier.
Let me ask you a question: do they need to be able to view the details of each item in this list at this point?
If not, I would simply change the default item click action. Then you will have exactly what you want, without the checkbox. Click each item to select it, then add all with a single action when done.
You can use the image part of the collection to provide a visual indication of which items have been selected. Create a relation that matches the RowID with the Multiple Files column in the User Profile row. If that relation is not empty, the item is selected. Use that in conjunction with an if-then-else column to generate a hero icon image for each row. Hell, you can even make it click once to select, then click again to remove if you want. That’s just a matter of reversing the process - instead of a make array column to add the item, use a remove element column to remove it.