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

 

 

 

 

  • 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 "\"")

  • 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\"})"

  • 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

  • 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.

  • 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?

  • 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