- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2019 06:03 AM
I have a catalog item in Madrid where someone can multi-select Departments from that table into a list collector. Since I have the Department of the Requester in another field already, I'd like that to already appear selected in that list. The display in Madrid isn't the two-bucket system, but a line of choices with "x" to remove. I've looked through forums and I can't get anything referencing the buckets to work, nor do I see anything in the documentation. If, for example, using my personal instance as a guide I wanted "HR" to show pre-populated as a selection in that list collector, what is the appropriate way to do this? Thank you.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2019 06:06 AM
Hello,
How is that department getting in to that other field already? I assume since it's a catalog item, it's through an onChange client script that is using glideajax? Or are you using default value on department with that?
If it's loading through a script to display in that field...in the same setValue section...just also setValue the list collector field with it. If it's through default value, repeat same for this field.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2019 08:50 AM
I suppose I have one more question: If I wanted to remove a specific selected item from the list collector, what would I do? Do I have to save all the values and then add back everything except the one I want to remove or is there a function to take care of that? Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2019 12:09 PM
Hi,
Please see instructions like this: https://love2dev.com/blog/javascript-remove-from-array/
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2019 05:36 AM
Ah, I just needed to know that it's stored simply as an array. I was getting confused by instructions that were equating this to more complex slushbucket and have been trying to reconcile conflicting articles. Simpler than expected. Thanks for clearing that up.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2019 07:21 AM
Hi, no problem.
Slushbuckets are just the "containers" the arrays are in...left side being all available selections pulled from a referenced table...right side being what has been selected thus in a separate array really.
Please mark any other reply as Helpful, if it was.
Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!