A little more filtered (132 Views)
Reply
Valued Contributor
Malcom Alga
Posts: 283
Registered: ‎05-04-2009
Message 1 of 4 (132 Views)
Accepted Solution

A little more filtered

In our SM71 implementation we have place where users can put a list of CI business services (affected.services) that are impacted by the change (or should I say the CI selected as logical.name which is the first in the assets list). I would like to limit the CI business services query list to CIs within the CI Device Type and Subtype of the CI listed in logical.name field if it is not empty. We are currently using a link to our affected.services field which is like (OOB):

field: affected.services
file: device
field (to/target): logical.name
expressions:
>if gui() then ($fill.search.format="device.cm3rrfc.search")
>if (not null(affected.services in $File)) then ($query="logical.name#affected.services in $File") else ($query="true")
>if $query#"true and " then ($L.void=strclpl($query, 9))
source field: affected.services
target field: logical.name
all other fields are blank.

Is there a way that I can adjust this to pull the device type and subtype from the logical.name CI and filter my resulting query list of affected.services?
Honored Contributor
Jacob Heubner
Posts: 4,177
Registered: ‎07-21-2008
Message 2 of 4 (132 Views)

Re: A little more filtered

One easy way to do it is on the link line for the logical.name, also add the device type and subtype fields to the list in the Source Field/Target Field array, pulling the values back to $variables (like $type and $subtype)

Then, in the affected.services link line, after the second line, add:

if (not null(logical.name in $File)) then ($query=$query+" and type=\""+$type+"\" and subtype=\""+$subtype"\"")

Then, when the user Fills the logical.name, it will pull back those other values as well, and then sure those to build the next query.
Valued Contributor
Malcom Alga
Posts: 283
Registered: ‎05-04-2009
Message 3 of 4 (132 Views)

Re: A little more filtered

Had not even thought of the link line for logical.name so I'm off to try this out. It sounds doable!
Valued Contributor
Malcom Alga
Posts: 283
Registered: ‎05-04-2009
Message 4 of 4 (132 Views)

Re: A little more filtered

Oh yeah itâ s doable. I had to adjust things a bit but this has really opened the door to granulizing searches for things.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.