Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Slush Bucket List

atulchauhan
Kilo Contributor

Hi All,

 

I am fetching values from a table into slush bucket. But now i want to fetch only some specific values so that some particular values can be shown to the users. I know the check but don't know how to apply it and where to apply it. Please suggest me on this.

 

Thanks in Advance!!

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

reference qualifier of the slushbucket.... write a script if the condition is complex ....


View solution in original post

11 REPLIES 11

david_legrand
Kilo Sage

Hi Atul,



Another option (if you have another requirements like "the users could undo the filter") could be :


http://www.servicenowguru.com/scripting/client-scripts-scripting/changing-filter-list-collector-vari...



And I use as well the following one to "select" automatically some records in the collection


http://www.servicenowguru.com/scripting/client-scripts-scripting/move-list-collector-options/



Regards,


Kalaiarasan Pus
Giga Sage

i think i jumped the gun here.. reference qual only works for reference variable ...     i guess i am getting old ... for List collectors we usually do it in onload script ...



these links will help you



http://www.servicenowguru.com/scripting/client-scripts-scripting/changing-filter-list-collector-vari...


https://community.servicenow.com/thread/162826


function to reset the filter will look like this ...



function setCIFilter() {


var query = "somefilter";


cig_filter.reset();


cig_filter.setQuery(query);


ciacRequest(null);


}



here ci is my list collector variable name.. replace it accordingly.....


Community Alums
Not applicable

Hi Kalai,



I have two list collectors on Catalog form and both are referencing same table lookup(Example). So I have created onchange catalog script. I am trying to add query for both fields. But in form i can see that query is effecting on one variable. In other variable i can see all records from the table. Please check the below script.



if(newValue == 'call_data') {



  queueg_filter.reset();


  queueg_filter.setQuery('u_field_name=Queue(s)');


  queueacRequest(null);



  siteg_filter.reset();


  siteg_filter.setQuery('u_field_name=Site(s)');


  siteacRequest(null);


}



here I can get the values for send variable and for 1st one i am getting all the records. (Example i keep the site's script in lower to queue, site is working fine and queue is not working. If i keept queue script lower to site, queue is working and sites is not working.) Please look into this.




Thanks a lost in advance.


Swamy.


Should work theoretically .. Checked the console for errors?