Hitachi

JP1 Version 12 JP1/IT Desktop Management 2 - Asset Console Creating an Access Definition File Guide


[JOIN_FIND] (find joined class)

[JOIN_FIND] joins multiple object classes and searches them.

Organization of this page

Syntax

#

Specify the [DUPLICATE] tag to suppress output of the second and subsequent result when the values of all properties of the search results are identical.

Values

Status

The following table lists and describes the possible statuses:

Status

Description

NORMAL

Normal end.

NODATA

No data satisfies the search conditions.

ERROR

MULTI

Legend:

—: Not applicable

Example

The following examples search multiple classes.

Example 1

The following example joins asset information, installed software information, and a list of installed software, and outputs a list of installed software information for asset number 1000:

[ASSET_ITEM_LOOP]
  [JOIN_FIND]
  [JOIN]
    joinassoc;InstalledLink;
    joinfrom;AssetInfo,InstalledInfo;
    jointype;INNER;
  [JOIN]
    joinassoc;InstalledListLink;
    joinfrom;InstalledInfo,InstalledList;
    jointype;INNER;
  [FIND_DATA]
    (AssetInfo.AssetNo = '1000')
  [GET_VALUE]
    INSTALLNAME = InstalledList.InstalledName
    VERSION     = InstalledList.InstalledVersion
    PERMIT      = InstalledList.InstalledPermit@
 
  [SET_VALUE]
    MSG = INSTALLNAME+'['+VERSION+'] ('+PERMIT+')'
    $ECHO(MSG)
 
  [SET_VALUE]
    $SETSTATUS('NORMAL')
[ASSET_ITEM_LOOP_END]
Execution result:

SoftwareA[0100] (authorized)

SoftwareA[0101] (authorized)

SoftwareB[0000] (authorized)

SoftwareC[0000] (unauthorized)

Example 2

The following example joins asset information and group information, then outputs the group name of asset ID 10000. This example specifies an outer join ([OUTER]) so, if no group ID has been specified, " " is output.

[JOIN_FIND]
[JOIN]
  joinfrom;AssetInfo,GroupInfo;
  jointype;OUTER;
  joinkey;AssetInfo.GroupID,GroupInfo.GroupID;
[FIND_DATA]
  (AssetInfo.AssetID = '10000')
[GET_VALUE]
  GROUP_NAME = GroupInfo.FullPathName
 
[SET_VALUE]
  STATUS = $GETSTATUS()
[IF]
  STATUS = NORMAL
  [THEN]
    [SET_VALUE]
      MSG = 'GROUP = ' + GROUP_NAME
      $ECHO(MSG)
  [ELSE]
    [SET_VALUE]
      MSG = 'JOIN (' + STATUS + ')'
      $ECHO(MSG)
[IF_END]
Execution result:

GROUP = Head Office/Sales Dept./Section 1