Reference Qualifier based on the other field value

Sahil Khan1
Tera Guru

Hello Everyone,

 

I would like to remove the "Analyst Group" option from the "Assignment Group" reference field on incident table in when a specific custom string field name (u_catalog_sys) has a value such as "Create Incident"

I also tried dictionary override javascript: 'type=null^ORtype=1cb8ab9bff500200158bffffffffff62^EQ^ref_incident.u_catalog_sysSTARTSWITHCreate Incident^sys_id!=c6c828c453751300ba3dddeeff7b1219';

 

using above reference qualifier it is remove "Analyst Group" for all the record not for specific one.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Sahil Khan1 

try this

javascript: if(current.u_catalog_sys.toString().startsWith('Create Incident')) 'type=null^ORtype=1cb8ab9bff500200158bffffffffff62^EQ^ref_incident.u_catalog_sysSTARTSWITHCreate Incident^sys_id!=c6c828c453751300ba3dddeeff7b1219';
else
	// give here your old query

If my response helped please mark it correct and close the thread so that it benefits future readers.

 

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

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Sahil Khan1 

try this

javascript: if(current.u_catalog_sys.toString().startsWith('Create Incident')) 'type=null^ORtype=1cb8ab9bff500200158bffffffffff62^EQ^ref_incident.u_catalog_sysSTARTSWITHCreate Incident^sys_id!=c6c828c453751300ba3dddeeff7b1219';
else
	// give here your old query

If my response helped please mark it correct and close the thread so that it benefits future readers.

 

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

Thanks you for your response but this solution not work for me

SahilKhan1_0-1698671299749.png

 

Thanks for your response, I have changed some part of given solution now it is working fine 

SahilKhan1_1-1698671972540.png