- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 09:09 AM - edited 02-22-2024 09:09 AM
Hi!
I'm trying to generate filtered results in my reference variable, depending on the value of a previous select box value on a catalogue item.
if select_box = X
apply "assigned_toISEMPTY" reference qualifier to reference_variable
I have a bunch of items that are to be assigned to users. If they select "New Assignment" on the cat item, then I do not want the users to be able to select an item, that is currently assigned to someone. Only unassigned items should appear. Is this possible?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 12:11 PM - edited 02-22-2024 12:15 PM
I've been able to do this with a script include. The script include would be a function looking something like this:
function exampleRefQual(){
var encodedQuery = '^';
if(current.variable.select_box == 'x')
{
encodedQuery = 'assigned_toISEMPTY';
}
return encodedQuery;
}
Then in the advanced reference qualifier for your reference variable, put
javascript:exampleRefQual()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 12:11 PM - edited 02-22-2024 12:15 PM
I've been able to do this with a script include. The script include would be a function looking something like this:
function exampleRefQual(){
var encodedQuery = '^';
if(current.variable.select_box == 'x')
{
encodedQuery = 'assigned_toISEMPTY';
}
return encodedQuery;
}
Then in the advanced reference qualifier for your reference variable, put
javascript:exampleRefQual()