GetInvalidFieldValues

Description

Returns an array of FieldInfo objects corresponding to all the Entity's fields with incorrect values.

The FieldInfo objects are arranged in no particular order. Use this method before committing a record to determine which fields contain invalid values, so that you can fix them.

Syntax

VBScript


entity.GetInvalidFieldValues 

Perl


$entity->GetInvalidFieldValues(); 
Identifier
Description
entity
An Entity object representing a user data record. Inside a hook, if you omit this part of the syntax, the Entity object corresponding to the current data record is assumed (VBScript only).
Return value
For Visual Basic, a Variant containing an Array of FieldInfo Objects is returned. Each FieldInfo object corresponds to a field of the Entity object that contains an invalid value. If all of the fields are valid, this method returns an Empty Variant. For Perl, a FieldInfos Object collection is returned.

Examples

VBScript


' Iterate through the fields and examine the field names and values
fieldObjs = GetInvalidFieldValues
For Each field In fieldObjs
   fieldValue = field.GetValue
   fieldName = field.GetName
   ' ... 
Next 

Perl


# Get the list of field values

$fieldvalues = $entity->GetInvalidFieldValues();



$numfields = $fieldvalues->Count();



for ($x = 0; $x < $numfields ; $x++)

   {

   $field = $fieldvalues->Item($x);                                       

   $fieldvalue = $field->GetValue();

   $fieldname = $field->GetName();

   # ... other field commands

   }