Service Desk Practitioners Forum
cancel

Create a view of change type(cm3r) and use join query

Highlighted
quanhl
Valued Contributor.

Create a view of change type(cm3r) and use join query

Hi all,
I have a problem with query when create a view:
-How can we join 2 table (cm3r and another table eg. device, on condition cm3r.affected.item=device.logical.name) in the query area?
You can see clearly in the picture I attached.
Can any one help me with this query?
Thank you so much.
Quanhl.
3 REPLIES
Jos van Harn
Super Contributor.

Re: Create a view of change type(cm3r) and use join query

In short: You can't. A basic query for a view is limited to the table you are querying.

Have you tried the more advanced search functions? Some allow a multi-table selection.
quanhl
Valued Contributor.

Re: Create a view of change type(cm3r) and use join query

@Harn: thank you, I have a idea:
I try to create calculations in format control of cm3r, (for example $file7, which get all device records that satisfy logical.name=affected.item). And I use $file7 in the basic query of that view.
Now the basic query is: eg. department in $file7#"IT".
But it can't work!
Quanhl.
Jos van Harn
Super Contributor.

Re: Create a view of change type(cm3r) and use join query

the "$file7" results are a record set, not a list (array) of device names. So this will not work (that way).

You could consider doing this kind of selection through a javascript and pulling out all the relevant IDs and storing them in a variable.