Namespace: Consultingwerk.OERA
Class 
Validate Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Inherited by: Consultingwerk.OERA.ValidationHelper

File:Validate
Purpose:Provides Assertion-Style validation routines for ProDataset
buffers
Syntax:Static methods
Description:The methods in this class can be used in the Business Entity
or Data Access class validation hooks like this:
USING Consultingwerk.OERA.* FROM PROPATH .
Validate:IsNotNullOrEmpty (BUFFER eCustomer:HANDLE, "Name":U, "Customer Name is required to be filled.") .
The pcErrorMessage parameter is optionally - indicating that the
default message from the ValidationDefaultMessages class
will be returned
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Sun Jul 21 11:31:35 CEST 2013
Notes:https://consultingwerk.atlassian.net/wiki/spaces/SCL/pages/8093717/Business+Entity+Validation+made+easy
Purpose: Constructor for the Validate class
Notes: Disallow instance creation



Top Method Summary
Options Name Purpose
+ LOGICAL CanFind (handle, character, character, character, character, character) Validates that a Business Entity record is accessible
+ LOGICAL CanFindByPrimaryKey (handle, character, character, character) Validates that a Business Entity record is accessible based on the primary unique key of the target table
+ LOGICAL CanFindByPrimaryKey (handle, character, character, character, character) Validates that a Business Entity record is accessible based on the primary unique key of the target table
+ LOGICAL EQ (handle, character, character, character) Validates that a character field is equal to a value
+ LOGICAL EQ (handle, character, date, character) Validates that a date field is is equal to a value
+ LOGICAL EQ (handle, character, datetime, character) Validates that a datetime field is is equal to a value
+ LOGICAL EQ (handle, character, datetime-tz, character) Validates that a datetime-tz field is is equal to a value
+ LOGICAL EQ (handle, character, decimal, character) Validates that a numeric field is equal to a value
+ LOGICAL EQ (handle, character, integer, character) Validates that a numeric field is equal to a value
+ LOGICAL GE (handle, character, character, character) Validates that a character field is greater than or equal to a value
+ LOGICAL GE (handle, character, date, character) Validates that a date field is greater than or equal to a value
+ LOGICAL GE (handle, character, datetime, character) Validates that a datetime field is greater than or equal to a value
+ LOGICAL GE (handle, character, datetime-tz, character) Validates that a datetime-tz field is greater than or equal to a value
+ LOGICAL GE (handle, character, decimal, character) Validates that a numeric field is greater than or equal to a value
+ LOGICAL GE (handle, character, integer, character) Validates that a numeric field is greater than or equal to a value
+ LOGICAL GT (handle, character, character, character) Validates that a character field is greater than a value
+ LOGICAL GT (handle, character, date, character) Validates that a date field is greater than a value
+ LOGICAL GT (handle, character, datetime, character) Validates that a datetime field is greater than a value
+ LOGICAL GT (handle, character, datetime-tz, character) Validates that a datetime-tz field is greater than a value
+ LOGICAL GT (handle, character, decimal, character) Validates that a numeric field is greater than a value
+ LOGICAL GT (handle, character, integer, character) Validates that a numeric field is greater than a value
+ LOGICAL IsEmpty (handle, character, character) Validates that a character field is Empty
+ LOGICAL IsEnumMember (handle, character, Class, character) Validates that a character field is the Character representation of a valid Enum member
+ LOGICAL IsInList (handle, character, character, character) Validates that a character field value is in a given list
+ LOGICAL IsInList (handle, character, character, character, character) Validates that a character field value is in a given list
+ LOGICAL IsInRange (handle, character, decimal, decimal, character) Validates that an decimal field is in a given range
+ LOGICAL IsInRange (handle, character, integer, integer, character) Validates that an integer field is in a given range
+ LOGICAL IsNotNullOrEmpty (handle, character, character) Validates that a character field is not Null or Empty
+ LOGICAL IsNotRestricted (handle, character, character, character) Validates that the given data item is not restricted by the security services
+ LOGICAL IsNotUnknown (handle, character, character) Validates that a field's value is not ?
+ LOGICAL IsNotUnknownOrZero (handle, character, character) Validates that a numeric field's value is not unknown value or zero
+ LOGICAL IsTokenNotRestricted (handle, character, character) Validates that the user has authorization for the given security token. This is not a field level validation. This is a row level validation
+ LOGICAL IsUnknown (handle, character, character) Validates that a field's value is ?
+ LOGICAL IsUnknownOrZero (handle, character, character) Validates that a numeric field's value is unknown or zero
+ LOGICAL IsValidEmailAddress (handle, character, character) Validates that a character field's value is a valid email address
+ LOGICAL IsValidEmailAddress (handle, character, logical, character) Validates that a character field's value is a valid email address
+ LOGICAL IsWeekday (handle, character, character) Validates that a date field's value is a weekday (Monday - Friday)
+ LOGICAL IsWeekday (handle, character, WeekDayEnum, character) Validates that a date field's value is on the given day of the week
+ LOGICAL IsZero (handle, character, character) Validates that a numeric field's value is zero
+ LOGICAL LE (handle, character, character, character) Validates that a character field is less than or equal to a value
+ LOGICAL LE (handle, character, date, character) Validates that a date field is less than or equal to a value
+ LOGICAL LE (handle, character, datetime, character) Validates that a datetime field is less than or equal to a value
+ LOGICAL LE (handle, character, datetime-tz, character) Validates that a datetime-tz field is less than or equal to a value
+ LOGICAL LE (handle, character, decimal, character) Validates that a numeric field is less than or equal to a value
+ LOGICAL LE (handle, character, integer, character) Validates that a numeric field is less than or equal to a value
+ LOGICAL LT (handle, character, character, character) Validates that a character field is less than a value
+ LOGICAL LT (handle, character, date, character) Validates that a date field is less than a value
+ LOGICAL LT (handle, character, datetime, character) Validates that a datetime field is less than a value
+ LOGICAL LT (handle, character, datetime-tz, character) Validates that a datetime-tz field is less than a value
+ LOGICAL LT (handle, character, decimal, character) Validates that a numeric field is less than a value
+ LOGICAL LT (handle, character, integer, character) Validates that a numeric field is less than a value
+ LOGICAL MaxLength (handle, character, integer, character) Validates that a character field's value is not longer than the given length
+ LOGICAL MinLength (handle, character, integer, character) Validates that a character field's value is not shorter than the given length
+ LOGICAL NE (handle, character, character, character) Validates that a character field is not equal to a value
+ LOGICAL NE (handle, character, date, character) Validates that a date field is is not equal to a value
+ LOGICAL NE (handle, character, datetime, character) Validates that a datetime field is is not equal to a value
+ LOGICAL NE (handle, character, datetime-tz, character) Validates that a datetime-tz field is is not equal to a value
+ LOGICAL NE (handle, character, decimal, character) Validates that a numeric field is not equal to a value
+ LOGICAL NE (handle, character, integer, character) Validates that a numeric field is not equal to a value
+ LOGICAL NonUpdatable (handle, character, character) Validates that a field is not changed
+ LOGICAL NotCanFind (handle, character, character, character, character, character) Validates that a Business Entity record is not available
+ LOGICAL NotCanFind2 (handle, character, character, character, character, character) Validates that a Business Entity record is not available
+ LOGICAL ReadOnly (handle, character, character) Validates that a field is not changed
+ LOGICAL ReadOnlyTable (handle, character) Validates that a table is not changed

Top Constructor Summary
Options Name Purpose
# Validate () Constructor for the Validate class


Method Detail
Top

PUBLIC LOGICAL CanFind (handle, character, character, character, character, character)

Purpose: Validates that a Business Entity record is accessible
Notes: &1 can be passed as part of the query string and will be replaced
(substitute) with the current field value of the source buffer

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate (the field's value may be used for &1 in the pcErrorMessage)
pcBusinessEntityName CHARACTER
The name of the Business Entity
pcTempTableName CHARACTER
The name of the temp-table
pcQueryString CHARACTER
The query string, e.g. "FOR EACH eSalesRep WHERE eSalesrep.SalesRep = 'BBB'" OR "WHERE eSalesrep.SalesRep = 'BBB'" OR "eSalesrep.SalesRep = 'BBB'"
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the record can be found
Top

PUBLIC LOGICAL CanFindByPrimaryKey (handle, character, character, character)

Purpose: Validates that a Business Entity record is accessible based on the primary
unique key of the target table
Notes: &1 can be passed as part of the query string and will be replaced
(substitute) with the current field value of the source buffer

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate (the field's value may be used for &1 in the pcErrorMessage)
pcBusinessEntityName CHARACTER
The name of the Business Entity
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the record can be found
Top

PUBLIC LOGICAL CanFindByPrimaryKey (handle, character, character, character, character)

Purpose: Validates that a Business Entity record is accessible based on the primary
unique key of the target table
Notes: &1 can be passed as part of the query string and will be replaced
(substitute) with the current field value of the source buffer

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate (the field's value may be used for &1 in the pcErrorMessage)
pcBusinessEntityName CHARACTER
The name of the Business Entity
pcTempTableName CHARACTER
The name of the temp-table
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the record can be found
Top

PUBLIC LOGICAL EQ (handle, character, character, character)

Purpose: Validates that a character field is equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcValue CHARACTER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL EQ (handle, character, date, character)

Purpose: Validates that a date field is is equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATE
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL EQ (handle, character, datetime, character)

Purpose: Validates that a datetime field is is equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL EQ (handle, character, datetime-tz, character)

Purpose: Validates that a datetime-tz field is is equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME-TZ
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL EQ (handle, character, decimal, character)

Purpose: Validates that a numeric field is equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdeValue DECIMAL
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL EQ (handle, character, integer, character)

Purpose: Validates that a numeric field is equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
piValue INTEGER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GE (handle, character, character, character)

Purpose: Validates that a character field is greater than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcValue CHARACTER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GE (handle, character, date, character)

Purpose: Validates that a date field is greater than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATE
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GE (handle, character, datetime, character)

Purpose: Validates that a datetime field is greater than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GE (handle, character, datetime-tz, character)

Purpose: Validates that a datetime-tz field is greater than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME-TZ
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GE (handle, character, decimal, character)

Purpose: Validates that a numeric field is greater than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdeValue DECIMAL
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GE (handle, character, integer, character)

Purpose: Validates that a numeric field is greater than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
piValue INTEGER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GT (handle, character, character, character)

Purpose: Validates that a character field is greater than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcValue CHARACTER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GT (handle, character, date, character)

Purpose: Validates that a date field is greater than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATE
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GT (handle, character, datetime, character)

Purpose: Validates that a datetime field is greater than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GT (handle, character, datetime-tz, character)

Purpose: Validates that a datetime-tz field is greater than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME-TZ
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GT (handle, character, decimal, character)

Purpose: Validates that a numeric field is greater than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdeValue DECIMAL
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL GT (handle, character, integer, character)

Purpose: Validates that a numeric field is greater than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
piValue INTEGER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsEmpty (handle, character, character)

Purpose: Validates that a character field is Empty
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsEnumMember (handle, character, Class, character)

Purpose: Validates that a character field is the Character
representation of a valid Enum member
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
poEnumClass Progress.Lang.Class
The Progress.Lang.Class of the Enum
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsInList (handle, character, character, character)

Purpose: Validates that a character field value is in a given list
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcList CHARACTER
The list of valid values
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsInList (handle, character, character, character, character)

Purpose: Validates that a character field value is in a given list
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcList CHARACTER
The list of valid values
pcDelimiter CHARACTER
The list delimiter character
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsInRange (handle, character, decimal, decimal, character)

Purpose: Validates that an decimal field is in a given range
Notes: Upper limit and lower limit are considered valid values

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdeLowerLimit DECIMAL
The lower limit of the range
pdeUpperLimit DECIMAL
The upper limit of the range
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsInRange (handle, character, integer, integer, character)

Purpose: Validates that an integer field is in a given range
Notes: Upper limit and lower limit are considered valid values

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
piLowerLimit INTEGER
The lower limit of the range
piUpperLimit INTEGER
The upper limit of the range
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsNotNullOrEmpty (handle, character, character)

Purpose: Validates that a character field is not Null or Empty
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsNotRestricted (handle, character, character, character)

Purpose: Validates that the given data item is not restricted by the security
services
Notes: Provides data security based on the SmartFramework ISecurityService

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcSecurityRealmCode CHARACTER
The code of the security realm to validate the field against
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field's value is not restricted
Top

PUBLIC LOGICAL IsNotUnknown (handle, character, character)

Purpose: Validates that a field's value is not ?
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsNotUnknownOrZero (handle, character, character)

Purpose: Validates that a numeric field's value is not unknown value or zero
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsTokenNotRestricted (handle, character, character)

Purpose: Validates that the user has authorization for the given security
token. This is not a field level validation. This is a row level
validation
Notes: Provides data security based on the SmartFramework ITokenSecurityService

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcSecurityTokenCode CHARACTER
The code of the security token to validate the
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field's value is not restricted
Top

PUBLIC LOGICAL IsUnknown (handle, character, character)

Purpose: Validates that a field's value is ?
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsUnknownOrZero (handle, character, character)

Purpose: Validates that a numeric field's value is unknown or zero
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsValidEmailAddress (handle, character, character)

Purpose: Validates that a character field's value is a valid email address
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsValidEmailAddress (handle, character, logical, character)

Purpose: Validates that a character field's value is a valid email address
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
plValidateMX LOGICAL
Optionally validate the MX of the given Domain
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsWeekday (handle, character, character)

Purpose: Validates that a date field's value is a weekday (Monday - Friday)
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsWeekday (handle, character, WeekDayEnum, character)

Purpose: Validates that a date field's value is on the given day of the week
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
poWeekDay Consultingwerk.WeekDayEnum
The WeekDayEnum value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL IsZero (handle, character, character)

Purpose: Validates that a numeric field's value is zero
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LE (handle, character, character, character)

Purpose: Validates that a character field is less than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcValue CHARACTER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LE (handle, character, date, character)

Purpose: Validates that a date field is less than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATE
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LE (handle, character, datetime, character)

Purpose: Validates that a datetime field is less than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LE (handle, character, datetime-tz, character)

Purpose: Validates that a datetime-tz field is less than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME-TZ
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LE (handle, character, decimal, character)

Purpose: Validates that a numeric field is less than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdeValue DECIMAL
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LE (handle, character, integer, character)

Purpose: Validates that a numeric field is less than or equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
piValue INTEGER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LT (handle, character, character, character)

Purpose: Validates that a character field is less than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcValue CHARACTER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LT (handle, character, date, character)

Purpose: Validates that a date field is less than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATE
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LT (handle, character, datetime, character)

Purpose: Validates that a datetime field is less than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LT (handle, character, datetime-tz, character)

Purpose: Validates that a datetime-tz field is less than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME-TZ
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LT (handle, character, decimal, character)

Purpose: Validates that a numeric field is less than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdeValue DECIMAL
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL LT (handle, character, integer, character)

Purpose: Validates that a numeric field is less than a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
piValue INTEGER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL MaxLength (handle, character, integer, character)

Purpose: Validates that a character field's value is not longer than the given
length
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
piMaxLength INTEGER
The maximum length for the character field
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 as a place holder for the length
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL MinLength (handle, character, integer, character)

Purpose: Validates that a character field's value is not shorter than the given
length
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
piMinLength INTEGER
The maximum length for the character field
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 as a place holder for the minimum length
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL NE (handle, character, character, character)

Purpose: Validates that a character field is not equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcValue CHARACTER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL NE (handle, character, date, character)

Purpose: Validates that a date field is is not equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATE
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL NE (handle, character, datetime, character)

Purpose: Validates that a datetime field is is not equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL NE (handle, character, datetime-tz, character)

Purpose: Validates that a datetime-tz field is is not equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdtValue DATETIME-TZ
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL NE (handle, character, decimal, character)

Purpose: Validates that a numeric field is not equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pdeValue DECIMAL
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL NE (handle, character, integer, character)

Purpose: Validates that a numeric field is not equal to a value
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
piValue INTEGER
The value to compare
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value and &2 for the compared value
Returns LOGICAL
True when the field meets the criteria
Top

PUBLIC LOGICAL NonUpdatable (handle, character, character)

Purpose: Validates that a field is not changed
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the current field value and &2 for previous field value (BEFORE-TABLE)
Returns LOGICAL
True when the field was not changed or the row-state is not row-modified
Top

PUBLIC LOGICAL NotCanFind (handle, character, character, character, character, character)

Purpose: Validates that a Business Entity record is not available
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate (the field's value may be used for &1 in the pcErrorMessage)
pcBusinessEntityName CHARACTER
The name of the Business Entity
pcTempTableName CHARACTER
The name of the temp-table
pcQueryString CHARACTER
The query string, e.g. "FOR EACH eSalesRep WHERE eSalesrep.SalesRep = 'BBB'"
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the record can not be found
Top

PUBLIC LOGICAL NotCanFind2 (handle, character, character, character, character, character)

Purpose: Validates that a Business Entity record is not available
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate (the field's value may be used for &1 in the pcErrorMessage)
pcBusinessEntityName CHARACTER
The name of the Business Entity
pcTempTableName CHARACTER
The name of the temp-table
pcQueryString CHARACTER
The query string, e.g. "FOR EACH eSalesRep WHERE eSalesrep.SalesRep = 'BBB'"
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the field value
Returns LOGICAL
True when the record can not be found
Top

PUBLIC LOGICAL ReadOnly (handle, character, character)

Purpose: Validates that a field is not changed
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcFieldName CHARACTER
The field name to validate
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the current field value and &2 for previous field value (BEFORE-TABLE)
Returns LOGICAL
True when the field was not changed or the row-state is not row-modified
Top

PUBLIC LOGICAL ReadOnlyTable (handle, character)

Purpose: Validates that a table is not changed
Notes:

Parameters:
phDatasetBuffer HANDLE
The handle to the ProDataset Buffer
pcErrorMessage CHARACTER
The error message, optionally using &1 as a place holder for the table name
Returns LOGICAL
Always True when the field was not changed or the row-state is not row-modified


Constructor Detail
Top

PROTECTED Validate ()

Purpose: Constructor for the Validate class
Notes: Disallow instance creation



©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       15.04.2024 05:53:21