Lookup using List - default Principle Class for RITM and SCTASK Configuration Item

Bret Smith
Giga Guru

Is there a way to set the default up on Lookup list for Configuration Item?

Where/How can i set Lookup list for the Configuration Item to the Principle class?
or 
is it somethin to set in the Dictionary Entry for Configuration Item 

 

BretSmith_0-1722453379393.png

 

 

 

7 REPLIES 7

It goes into Ref qualifier.

Like this:

javascript: ['incident', 'problem'].indexOf(current.sys_class_name + '') == -1? '' : 'operational_statusNOT IN' + new OpsStatusFilter('cmdb_ci').by('CreateTask').join() + '^sys_class_nameINjavascript:new%20PrincipalClass().getPrincipalClasses()'

 

What we've done here is add to the existing filter.

Now tell me do you see any change in the popup

How do I add (correct syntax) for
name isnotempty
to the reference qualifier line below:

sys_class_nameINjavascript:new PrincipalClass().getPrincipalClasses()


BretSmith_0-1722463544284.png

 

Here you go:

nameISNOTEMPTY^sys_class_nameINjavascript:new%20PrincipalClass().getPrincipalClasses()

 

Here's a shortcut you can use to when working with reference qualifiers.

1. Open your table in list view (in this case, cmdb_ci)

2. Use the filter (funnel icon) to set your filter

3. Hit Run button

4. Right click on the breadcrumb

5. Select Copy query

 

Now your clipboard has the query you need, which you will paste in your reference qualifier or if required, in GlideRecord scripts.

 

Also, as you may have figured out already, it could take multiple attempts to get the query right. The devil is in the 'appending' (putting 2 filters together) and the 'dynamic' parts (parts of a query that call a script).