GetFieldsUpdatedThisGroup

Description

Returns a FieldInfo Object for each field that was modified since the most recent call to BeginNewFieldUpdateGroup.

Use this method to mark the end of a group of calls to SetFieldValue (You must have previously called BeginNewFieldUpdateGroup to mark the beginning of the group.) This technique is useful for web-based systems where you might need to track any changes to the fields in a form. For example, if the user moves to another web page, you can call this method to save the current state of the form and restore it when the user returns to that page.

Syntax

Perl


$entity->GetFieldsUpdatedThisGroup(); 
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.
Return value
A FieldInfos Object collection is returned.

Example

Perl


$entity->BeginNewFieldUpdateGroup()

$entity->SetFieldValue("field1", "1" );

$entity->SetFieldValue("field2", "submitted");

$entity->SetFieldValue("field3", "done");

$updatedFields = $entity->GetFieldsUpdatedThisGroup ();

$count = $updatedFields->Count();

# Iterate over all the fields that changed 

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

   {
   $field = $updatedFields->Item($x);

   # do other tasks...

 }