None function

Syntax

None(fieldlist)

where fieldlist is an arbitrary-length list of fields in the form:

[recordname.]fieldname1 [, [recordname.]fieldname2] ...

Description

The None function takes an arbitrary number of field names as parameters and tests for values. None returns True if none of the specified fields contain a value. It returns False if any one of the fields contains a value.

A blank character field, or a zero (0) numeric value in a required numeric field is considered a null value.

Example

The following example uses None to check whether REFERRAL_SOURCE has a value:

If None(REFERRAL_SOURCE) or
   REFERRAL_SOURCE = "EE" Then
   Gray(EMP_REFERRAL_ID);   
End-if;

The following example uses None with a variable:

&ONETIME = FetchValue(POSN_INCUMB_WS.EMPLID, 1); 
   If None(&ONETIME) Then 
   /* do processing */ 
End-if;

Related Functions

Function Description

All function

Checks to see if a field contains a value, or if all the fields in a list of fields contain values. If any of the fields is Null, then All returns False.

AllOrNone function

Checks if either all the field parameters have values, or none of them have values. Use this in examples where if the user fills in one field, she must fill in all the other related values.

OnlyOne function

Checks if exactly one field in the set has a value. Use this when the user must fill in only one of a set of mutually exclusive fields.

OnlyOneOrNone function

Checks if no more than one field in the set has a value. Use this in examples when a set of fields is both optional and mutually exclusive; that is, if the user can put a value into one field in a set of fields, or leave them all empty.