- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2017 07:01 AM
I have a filter that sets a script on a list collector and now i need to add another condition
I thought by just adding the && it would work but it didn't - Can you tell me what I am doing wrong to get both those conditions in there. TIA
function onLoad() {
//Apply a default filter to the list collector variable
var collectorName = 'database_name';
var filterString = 'u_database_request=true&&type=Microsoft SQL Server';
//Hide the list collector until we've set the filter
g_form.setDisplay(collectorName, false);
setCollectorFilter();
function setCollectorFilter(){
//Test if the g_filter property is defined on our list collector.
//If it hasn't rendered yet, wait 100ms and try again.
if (eval('typeof(' + collectorName + 'g_filter)') == 'undefined' ) {
setTimeout(setCollectorFilter, 100);
return;
}
//Find the filter elements
var fil = gel('ep');
//Hide the filter elements by un-commenting the following lines
/*fil.rows[0].style.display = 'none';
fil.rows[1].style.display = 'none';
fil.nextSibling.rows[0].style.display = 'none'; //Filter description text*/
//Reset the filter query
eval(collectorName + 'g_filter.reset()');
eval(collectorName + 'g_filter.setQuery("' + filterString + '")');
eval(collectorName + 'acRequest(null)');
//Redisplay the list collector variable
g_form.setDisplay(collectorName, true);
}
}
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2017 07:13 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2017 07:13 AM
Try replacing the && with ^
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2017 07:17 AM
Thanks alot that worked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2017 07:15 AM
HI Wendy,
Please replace u_database_request=true&&type=Microsoft SQL Server with u_database_request=true^type=Microsoft SQL Server. It should work.