Important

   

This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 22.1 for BMC Helix Operations Management. Open link

exists()

Verify the existence of a PSL object

Syntax

exists(object,[inherit])

Parameters

Parameter

Definition

object

alphanumeric identifier for the object whose existence is being verified The object is assigned when the object is created.

inherit

boolean expression controls whether exists will search the inheritance hierarchy to verify the existence of object

*Valid Values*

  • TRUE- do not search the inheritance hierarchy
  • FALSE-search the inheritance hierarchy if object is not a reference to an absolute object

Description

The exists() function returns TRUE if object exists, FALSE otherwise. The exists() function is useful in application discovery procedures that determine whether a discovered instance has previously been discovered and instantiated in the object hierarchy. 

The exists() function searches for any PSL object that matches object, including PSL variables, even if the object was not created with the create() function.

Example

This example checks to see if the user name "jsmith" has already been created:

name = "jsmith";
if (exists(name)) {
print(name);
} else {
print("User name does not exist");
}
Was this page helpful? Yes No Submitting... Thank you

Comments