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.

Syntaxe

VBScript

entity.GetFieldsUpdatedThisGroup 

Perl

$entity->GetFieldsUpdatedThisGroup(); 
Identificateur
Description
entity
Objet Entity représentant un enregistrement de données utilisateur. Si vous omettez cette partie de la syntaxe au sein d'un point d'ancrage, l'objet Entity correspondant à l'enregistrement de données en cours est faux (VBScript uniquement).
Valeur renvoyée
For Visual Basic, a Variant containing an Array of FieldInfo Objects is returned. Each FieldInfo object corresponds to a field whose value changed since the most recent call to BeginNewFieldUpdateGroup. If no fields were updated, this method returns an Empty Variant. For Perl, a FieldInfos Object collection is returned.

Exemples

VBScript

BeginNewFieldUpdateGroup 
SetFieldValue "field1", "1" 
SetFieldValue "field2", "submitted" 
SetFieldValue "field3", "done" 
updatedFields = GetFieldsUpdatedThisGroup 

' Iterate over all the fields that changed 
For Each field In updatedFields 
   ' ... 
Next 

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...

 } 

Feedback