CA SDM::.SPEL::. Is empty

Document created by TMACUL Champion on Jan 25, 2017
Version 1Show Document
  • View in full screen mode

Is empty

Overview

A spell function checking if a given attribute is an empty string or equals to a NULL value.

Usage

<source lang="javascript"> bool is_empty(attr); </source>

  • attr - any string variable to be checked

Results

Returns true if attr is NULL or is an empty string, otherwise returns false.

Examples

<source lang="javascript"> if(is_empty(string1)) {

 // Enter an alert message that appears when the if statement is fulfilled  zmsg=format(" string1 is required in order to close this ticket");  set_error(1);  set_return_data(zmsg);  return;

} </source> <source lang="javascript"> string contact_persid; if(!is_empty(contact_persid)) {

    // ...

} </source>

 

Is empty - SDU 

Attachments

    Outcomes