Hitachi

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


[CLASS_FIND] (find object class)

[CLASS_FIND] searches an object class.

If the class being searched matches the specified conditions, its property values are substituted into the declared variables. You can specify the [CLASS_FIND] tag the number of times required to find the base object class.

Organization of this page

Syntax

[CLASS_FIND]
  name-of-object-class-to-search
   ([FIND_DATA])
    condition-expression
  [GET_VALUE]
    assignment-statement
   ([ORDER_ASC] or [ORDER_DESC])
    sort-key

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 example outputs the asset number of asset ID 10000:

[CLASS_FIND]
  AssetInfo
[FIND_DATA]
  (AssetInfo.AssetID  = '10000')
[GET_VALUE]
  ASSETNO     = AssetInfo.AssetNo
  ASSETSTATUS = AssetInfo.AssetStatus@
 
[SET_VALUE]
  STATUS = $GETSTATUS()
[IF]
  STATUS = NORMAL
  [THEN]
    [SET_VALUE]
      MSG = 'ASSETNO = '+ASSETNO+'('+ASSETSTATUS+')'
      $ECHO(MSG)
  [ELSE]
    [SET_VALUE]
      MSG = 'CLASS_FIND ('+STATUS+')'
      $ECHO(MSG)
[IF_END]
Execution result:

ASSETNO = R11111(active)