- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2018 06:22 AM
Hi,
I have a slush bucket to select values of locations. i want to feed the selected values to a query in client script. I used the following but it doesn't pull the values.
I have the slush bucket defined: <g:ui_slushbucket name="sb" left_header="Available" right_header="Selected">
var values = sb.getValues(sb.getRightSelect());
What could be wrong?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2018 07:09 AM
Did you try: var values = sb.getValues(getRightSelect());
Without the second sb in it
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
04-27-2018 06:51 AM
Thank you, I tried this but getting error:
ERROR: Cannot read property 'getRightSelect' of null
I defined in html:
<g:ui_slushbucket name="sb" left_header="Available" right_header="Selected">
<j:while test="${v_user.next()}">
<option value="${v_user.sys_id}" title="${v_user.name}"> ${v_user.name} </option>
</j:while>
</g:ui_slushbucket>
I have the values in left that I am adding to right.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2018 06:55 AM
Try using this in client script:
var varName = 'sb';
var values = varName.getRightSelect();
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
04-27-2018 06:58 AM
Tried that and used the exact code they had in the other thread and I get the error.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2018 07:07 AM
So in the post I referenced, he gets the exact error you mention then goes on to explain how he fixed it. I'm just not that versed in slushbucket to know what it all means, but from what I gather, he says the name you define for the slushbucket in HTML which you did as "sb" is then defined within the scope of the client script...which doesn't make sense why using straight up sb or assigning it to a variable doesn't work for you...hmm
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
04-27-2018 07:09 AM
Did you try: var values = sb.getValues(getRightSelect());
Without the second sb in it
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!