DeleteFieldValue

Description

Removes the specified value from the field's list of values.

This method is intended only for those fields that can support a list of values. However, it is legal to use this method for a field that takes a single value. (In that case, the field's only value must be the same as old_value; the method then sets the field's value to the empty value.)

You can call this method only if the Entity object is editable. To make an existing Entity object editable, call the EditEntity method of the Session object.

Syntax

VBScript


entity.DeleteFieldValue field_name, old_value 

Perl


$entity->DeleteFieldValue(field_name, value); 
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).
field_name
A String containing a valid field name of this Entity object.
old_value
A Variant containing the value to remove from the field's list of values.
value
A string containing the value to remove from the field's list of values.
Return value
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.

Examples

VBScript


AddFieldValue "field1", "option 1" 
AddFieldValue "field1", "option 2" 
AddFieldValue "field1", "option 3" 
DeleteFieldValue "field1", "option 2" 
DeleteFieldValue "field1", "option 3" 

Perl


$entity->AddFieldValue("field1", "option 1");

$entity->AddFieldValue("field1", "option 2");

$entity->AddFieldValue("field1", "option 3");



$entity->DeleteFieldValue("field1", "option 2");

$entity->DeleteFieldValue("field1", "option 3");