GetFieldsUpdatedThisSetValue
Description
Returns a FieldInfo object for each of the Entity's fields that was modified by the most recent SetFieldValue call.
This method usually returns
a single FieldInfo object for the field that was modified by SetFieldValue
.
However, this method can return multiple FieldInfo objects if other fields
are dependent on the field that was changed. In such a case, hook code could
automatically modify the value of any dependent fields, causing them to be
modified as well and thus reported by this method.
Syntax
VBScript
entity.GetFieldsUpdatedThisSetValue
Perl
$entity->GetFieldsUpdatedThisSetValue
();
- 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, one for each field in the Entity object whose value was changed by the most recent invocation of SetFieldValue. If no fields were modified, this method returns an Empty Variant. For Perl, a FieldInfos Object collection is returned.
Examples
VBScript
SetFieldValue "field1" "100"
modifiedFields = GetFieldsUpdatedThisSetValue
numFields = UBound(modifiedFields) + 1
If numFields > 1 Then
OutputDebugString "Changing field1 resulted in changes to " _
& numFields & " other fields"
End If
Perl
$entity->SetFieldValue("field1", "100");
$modifiedfields = $entity->GetFieldsUpdatedThisSetValue();
$numfields = $modifiedfields->Count();
if ($numfields > 1)
{
$session->OutputDebugString("Changing field1 resulted in changes
to ".$numfields." other fields");
}