prinicipal class need to displayed on ci on incident

praveen kummar
Tera Contributor

we implemented principal class   class need to displayed on  ci field on incident table . but principal class  shows even retried class  . so how to restrict  retried class  while using principal class as reference qualifier on CI field on incident 

1 ACCEPTED SOLUTION

Swarup Patra
Kilo Guru

To restrict the retired class while using the principal class as a reference qualifier on the CI field on the incident table, you can follow these steps:

1. Navigate to the incident table by typing 'incident.list' in the left navigation filter.
2. Open any incident record.
3. Right-click on the 'Configuration Item' field label and select 'Configure Dictionary'.
4. In the 'Dictionary Entry' form, scroll down to the 'Attributes' related list.
5. Add a new attribute with the name 'ref_qual_elements' and the value 'u_principal_class,u_retired_class'.
6. In the 'Value' field, enter a JavaScript condition that checks if the principal class is not retired. For example, "javascript: 'u_principal_class=true^u_retired_class!=true'".
7. Click 'Update' to save the changes.

This will ensure that only non-retired principal classes are displayed in the CI field on the incident table.

Please note that 'u_principal_class' and 'u_retired_class' should be replaced with the actual field names in your instance. Also, the condition in the JavaScript code should be adjusted according to your requirements.


nowKB.com

If you want to know any information about Service Now . Visit to https://nowkb.com/home

View solution in original post

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Did you try dictionary override and added under attribute. Please sharesome screen shot how it is showing on incident form.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi Atul,
We have a requirement to filter CI selection on Change Request form to show CI's from the Principal Class filter only for which we are using the below Reference Qualifier override on Change Request which correctly filters CI's from the Principal classes

sys_class_nameINjavascript:new PrincipalClass().getPrincipalClasses();
Now, the issue is for certain Class eg: Software Instance class, we need to show only the unique names with the latest version in the list.
For eg: Google Chrome has multiple entries in the Software instance table, so we need to show only one entry of 'Google Chrome' in the CI list, Similarly for all CI's we need to show only Installed CI's and filter out the Retired CI's from the list.
Can you please help suggest how can i update the reference qualifier to show latest version software only in this principal class filter.

Swarup Patra
Kilo Guru

To restrict the retired class while using the principal class as a reference qualifier on the CI field on the incident table, you can follow these steps:

1. Navigate to the incident table by typing 'incident.list' in the left navigation filter.
2. Open any incident record.
3. Right-click on the 'Configuration Item' field label and select 'Configure Dictionary'.
4. In the 'Dictionary Entry' form, scroll down to the 'Attributes' related list.
5. Add a new attribute with the name 'ref_qual_elements' and the value 'u_principal_class,u_retired_class'.
6. In the 'Value' field, enter a JavaScript condition that checks if the principal class is not retired. For example, "javascript: 'u_principal_class=true^u_retired_class!=true'".
7. Click 'Update' to save the changes.

This will ensure that only non-retired principal classes are displayed in the CI field on the incident table.

Please note that 'u_principal_class' and 'u_retired_class' should be replaced with the actual field names in your instance. Also, the condition in the JavaScript code should be adjusted according to your requirements.


nowKB.com

If you want to know any information about Service Now . Visit to https://nowkb.com/home