Highlighted
Absent Member.
Absent Member.
341 views

Link query - incident table is not working as expected

Hello,

We want to filer CIs(affected.items) while creating tickets (interactinons), hence in the link record ,we are trying to use filter CIs which has istatus="In Use" but its not working for us. Might be Syntext is wrong. We are still seeing all CIs when we click on the fill button on the interaction. please help us to solve this issue.

if ($fill.skip.master=true) then ($fill.skip=true;cleanup($fill.skip.master))
$query="device.type=\"bizservice\" and istatus=\"In Use\""
if (not (null(affected.item in $File))) then $query+=(" and logical.name#\""+affected.item in $File+"\"") 

somehow its not wotking, could anyone tell where we are going wrong here?

Thanks,

Ravi

 

 

 

 

0 Likes
6 Replies
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Link query - incident table is not working as expected

I did something very similar and it did work.  Your syntax looks correct to me so I am not sure why it is not working.

Here is the code I have that works:

if ($fill.skip.master=true) then ($fill.skip=true;cleanup($fill.skip.master))
$query="device.type=\"bizservice\" and subtype=\"it service\""
if (not  (null(affected.item in $File))) then $query+=(" and logical.name#\""+affected.item in $File+"\"")

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Link query - incident table is not working as expected

I hit post too soon.

I have had trouble before using '=' or '<>' in link lines and had more success using 'isin' even when there was only one item.  so you could try:

$query="(device.type isin {\"bizservice\"}) and (istatus isin {\"In Use\"})"

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Link query - incident table is not working as expected

Many Thanks for your reply,

I have tried with isin and still its displaying all business cis instead of "In Use" business Cis. I dont know what is wrong here. Does it working for u?

Regards,

Ravi

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Link query - incident table is not working as expected

The code I posted works perfectly for us.  if it is not working for you, then you might need to open a case with hp.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Link query - incident table is not working as expected

Which SM version do you use?

Which link did you modify?

I quickly checked SM9.40 OOB Classic Mode system, link SD.open.interaction and could not find that part with "$fill.skip.master" .

Are you sure you test the link line you are modifying?

Thank you for using the MicroFocus ServiceManager Support and News Forum. If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Link query - incident table is not working as expected

Hi,

The cause of this issue would be various. And to debug this issue, you can add few prints like below:

if ($fill.skip.master=true) then ($fill.skip=true;cleanup($fill.skip.master))

$L.void=rtecall("msg",,"The debug information in link xxx, the $query 1:" + str($query))
$query="device.type=\"bizservice\" and istatus=\"In Use\""

$L.void=rtecall("msg",,"The debug information in link xxx, the $query 2:" + str($query))
if (not (null(affected.item in $File))) then $query+=(" and logical.name#\""+affected.item in $File+"\"") 

$L.void=rtecall("msg",,"The debug information in link xxx, the $query 3:" + str($query))

Regards,

Ling-Yan

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.