Home Search

DriveWorks Solo 21
Functions

Send Feedback

Functions

The following functions have been added to DriveWorks 12.

EmailGetDomainName

Gets the domain name portion of an email address.

Syntax

EmailGetDomainName(Email As String)

Where:

Email must be a valid email address.

Examples

RuleMeaning
EmailGetDomainName("fredbloggs@hotmail.com")Will return the domain name from the given email address i.e. "hotmail.com".

EmailGetUserName

Gets the user name portion of an email address.

Syntax

EmailGetUserName(Email As String)

Where:

Email must be a valid email address.

Examples

RuleMeaning
EmailGetUserName("fredbloggs@hotmail.com")Will return the user name from the given email address i.e. "fredbloggs".

IfEmpty

Checks to see if its first argument is an empty value. If the value isn't an empty value it is returned as-is, otherwise a secondary value is returned.

Syntax

IfEmpty(Primary Value As String, Alternative Value As String)

Where:

Primary Value is the value that should be tested.

Alternative Value is the value which will be returned if the first value is empty.

Examples

RuleMeaning
IfEmpty(ColorReturn,"Red")Will return "Red" when the value coming from the control Color is empty.

IfError

Checks to see if its first argument is an error. If the value isn't an error it is returned as-is, otherwise a secondary value is returned.

Syntax

IfError(Primary Value As String, Error Replacement Value As String)

Where:

Primary Value is the value to check for an error.

Error Replacement Value is the value to use if the primary value is an error.

Examples

RuleMeaning
IfError(DWVariableLength,2475)Will return 2475 when the value coming from the variable Length is an error.

IfNonBoolean

Checks to see if its first argument is a boolean. If the value is a boolean it is returned as-is, otherwise a secondary value is returned.

Syntax

IfNonBoolean(Primary Value As Boolean, Alternative Value As String)

Where:

Primary Value is the value whose type should be tested.

Alternative Value is the value which will be returned if the type of the first value fails the type test.

Examples

RuleMeaning
IfNonBoolean(OptionRequiredReturn,FALSE)Will return FALSE when the value coming from the control OptionRequired is not a boolean.

IfNonNumber

Checks to see if its first argument is a number. If the value is a number it is returned as-is, otherwise a secondary value is returned.

Syntax

IfNonNumber(Primary Value As String, Alternative Value As String)

Where:

Primary Value is the value whose type should be tested.

Alternative Value is the value which will be returned if the type of the first value fails the type test.

Examples

RuleMeaning
IfNonNumber(DWVariableLength,0)Will return 0 when the value coming from the variable Length is not a number.

IsBoolean

Returns TRUE if the given value is a boolean and FALSE if not.

Syntax

IsBoolean(Value As Boolean)

Where:

Value is the value to check.

Examples

RuleMeaning
IsBoolean(OptionRequiredReturn)Will return TRUE when the value coming from the control OptionRequired is TRUE or FALSE otherwise it will return FALSE.

IsEmpty

Returns TRUE if the given value is either an empty value or a zero-length piece of text.

Syntax

IsEmpty(Value As String)

Where:

Value is the value to check.

Examples

RuleMeaning
IsEmpty(ColorReturn)Will return TRUE when the value coming from the control Color is empty.

IsNonBoolean

Returns TRUE if the given value is not a boolean and FALSE if it is.

Syntax

IsNonBoolean(Value As String)

Where:

Value is the value to check.

Examples

RuleMeaning
IsNonBoolean(OptionRequiredReturn)Will return TRUE when the value coming from the control OptionRequired is not a Boolean value.