SetFieldValues
Description
Places the specified values in the named fields. This method allows multiple field values to be set with one call. The two input string arrays are parallel lists, where field_names lists the field names and new_values lists the field values. For example, item N in field_names provides the field name and item N in new_values provides the value for that field.
The return value is an array of result messages for each field.
Each result message is the same message that is returned by a single call
to the SetFieldValue method.
If there are no errors, the result is a String array of the same number of
elements as field_names, with each element being an empty String.
Syntax
Perl
$entity->SetFieldValues (field_names, new_values);
- Identifier
- Description
- entity
- An Entity object representing a user data record.
- field_names
- The list of field names for values to be set. A reference to an array of strings containing the valid field names.
- new_values
- The list of field values to set for the specified field names. A reference to an array of strings containing the new values.
- Return value
- A reference to an array of strings containing the result messages for each field.
If changes to the field are permitted, this method returns an empty String; otherwise, this method returns a String containing an explanation of the error.
Example
Perl
my @fieldnames = ("submitter", "owner");
my @fieldvalues = ("userA", "userB");
$entity->SetFieldValues(\@fieldnames, \@fieldvalues);