exists()
Verify the existence of a PSL object
Syntax
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*
|
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:
if (exists(name)) {
print(name);
} else {
print("User name does not exist");
}