The following functions have been added to DriveWorks 12.
Gets the domain name portion of an email address.
EmailGetDomainName(Email As String)
Where:
Email must be a valid email address.
Rule | Meaning |
---|---|
EmailGetDomainName("fredbloggs@hotmail.com") | Will return the domain name from the given email address i.e. "hotmail.com". |
Gets the user name portion of an email address.
EmailGetUserName(Email As String)
Where:
Email must be a valid email address.
Rule | Meaning |
---|---|
EmailGetUserName("fredbloggs@hotmail.com") | Will return the user name from the given email address i.e. "fredbloggs". |
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.
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.
Rule | Meaning |
---|---|
IfEmpty(ColorReturn,"Red") | Will return "Red" when the value coming from the control Color is empty. |
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.
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.
Rule | Meaning |
---|---|
IfError(DWVariableLength,2475) | Will return 2475 when the value coming from the variable Length is an error. |
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.
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.
Rule | Meaning |
---|---|
IfNonBoolean(OptionRequiredReturn,FALSE) | Will return FALSE when the value coming from the control OptionRequired is not a boolean. |
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.
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.
Rule | Meaning |
---|---|
IfNonNumber(DWVariableLength,0) | Will return 0 when the value coming from the variable Length is not a number. |
Returns TRUE if the given value is a boolean and FALSE if not.
IsBoolean(Value As Boolean)
Where:
Value is the value to check.
Rule | Meaning |
---|---|
IsBoolean(OptionRequiredReturn) | Will return TRUE when the value coming from the control OptionRequired is TRUE or FALSE otherwise it will return FALSE. |
Returns TRUE if the given value is either an empty value or a zero-length piece of text.
IsEmpty(Value As String)
Where:
Value is the value to check.
Rule | Meaning |
---|---|
IsEmpty(ColorReturn) | Will return TRUE when the value coming from the control Color is empty. |
Returns TRUE if the given value is not a boolean and FALSE if it is.
IsNonBoolean(Value As String)
Where:
Value is the value to check.
Rule | Meaning |
---|---|
IsNonBoolean(OptionRequiredReturn) | Will return TRUE when the value coming from the control OptionRequired is not a Boolean value. |