Filter A LookUp SelectBox by a Single Line Text

Markell
Tera Guru

Hi Guys 

I have tried a few things but I seem to be getting nowhere.

I simply want to filter this LookUp SelectBox (Subcategory) dependant value in the sys_choice table by the Single Line Text field (Category Label)

Markell_0-1762263287568.png

Bit of context: I was having a nightmare trying to filter directly via the other LookUp SelectBox (Category) but when I did A script include and hard coded the Category as 'End User Hardware' the filter worked!
So now I'm trying to just simply filter by a string.

I am currently just seeing if the following reference qualifier will work:

javascript:
var label = current.variables.category_label;
'inactive=false^element=subcategory^sys_domain=global^name=incident^dependent_value=' + label + '^ORDERBYlabel';

Markell_2-1762263635010.png

 

 

Any help welcome

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Markell 

it should work provided you have dependent subcategory for those categories and you added variable attribute as this in lookup select box variable

ref_qual_elements=category_label

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Markell 

it should work provided you have dependent subcategory for those categories and you added variable attribute as this in lookup select box variable

ref_qual_elements=category_label

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader