Affected Configuration Item link line query


I have a query regarding the link line query on field on Incidents, probsummary and rootcause. I am having some issues in making the out of box query work in my environment.

We are having an out of box integration with HP uCMDB and the relationships are also pushed into HP SM. When I selected the affected service, the affected configuration item ideally should show me only the related CIs.

  • Below is the link line query for affected.item


  • once the affected.item is filled in, next link line query is to show the related CIs under the field ( out of box link line JS expression )


With the above link line query, I am not getting any related CIs . Though there are ci relationship records existing for the selected affected.item CI value. Getting the below error,


I modified the link line JS script as below,

image.pngOnce this is done, I am getting the related CIs . 

What I would like to know , why out of the box query is not returning any records ?

could anyone share a working piece of out of box script on the field in the link line.