PRESENT

The PRESENT function tests for the presence of an object.

PRESENT is commonly used with the IF function in a map rule to provide conditional logic. For example, if the object is present, do this; otherwise, do something else.

Similarly, PRESENT is commonly used with the WHEN function in component rules to provide conditional validation logic.

Syntax:
PRESENT (single-object-expression)
Meaning:
PRESENT (object_to_look_for)
Returns:
"True" or "false"

PRESENT returns "true" if the input argument does not evaluate to "none"; the object is present. It returns "false" if the input argument evaluates to "none"; the object is not present.

Examples

  • PRESENT (Trailer:File)

    This example returns "true" if Trailer is present and returns "false" if Trailer is absent.

  • IF (PRESENT(MiddleInitial:.:Input), MiddleInitial:.:Input, "***" )

    This example in a map rule maps MiddleInitial if it is present. If MiddleInitial is not present, three asterisks are mapped.

  • WHEN (PRESENT (AreaCode Field), PRESENT (PhoneNo Field))

    In this example, PRESENT is being used in conjunction with the WHEN function in a component rule to determine whether a particular object is valid.

Related functions

  • ABSENT
  • IF
  • WHEN