Hide related lists if those lists are "Empty"

jbdevsn
Kilo Contributor

I created a Child Incidents Table in an application from scratch and I am trying to have the table hidden if there are "No Records" in the table.

Anyone know how to go about doing this?

Thanks.

4 REPLIES 4

Chuck Tomasi
Tera Patron

Right click on the list header and choose Configure> List Control.



Check the box "Omit if empty".



find_real_file.png



Save your list control settings. Observe the result.



http://wiki.servicenow.com/index.php?title=Configuring_Lists


Great! Thank you Chuck. I had another question about omitting annotations at the top of forms based on a condition.



For example:



I want to have a blue annotation box at the top of an incident page if it is a child incident. If it is not a child incident, then I want it to be hidden. I also want to have the parent incident number "clickable" and have it take me to the parent incident.



Thanks!


Hi Jack,



The blue annotations are on/off based on the Toggle Annotations condition. The design idea behind those is that they are great online documentation to help newbies figure out a new form. Once understood, they can be turned off. There is no (supported) conditional way to do annotations. I recall seeing some notes about doing this with DOM manipulation, but I don't encourage that as it leads to upgrade issues.



As for a clickable number, just put the parent field (or similar related link) on the form and you automatically get an "i" icon to the right of the reference value. There's your clickable link. It's consistent with the rest of the behavior of the system - which is important for a user experience. When you start making one form behave one way and another behave another, users get confused.



That being said, if you are feeling skillful with JavaScript and Jelly, you could create a UI macro and wrap it in a formatter and place that on the form, but again, this becomes a custom solution that doesn't really fit and in my opinion is redundant functionality.


@Chuck Tomasi I have a similar question but bit twisted.

1. user is in TOP/abc domain

2. test group1 is in TOP domain

3. test group2 is in TOP/abc domain

So when the user visits his profile in the related list, in groups tab he can see groups of his own domain which is TOP/abc but for the groups which are in TOP domain he sees the row with "empty" values as shown in the below screenshot.

 

Can you please suggest what can be done to hide rows with empty groups?find_real_file.png