GetFieldValue

Description

Returns the FieldInfo object for the specified field.

This method returns a FieldInfo object from which you can obtain information about the field. This method does not return the actual value stored in the field. To retrieve the actual value (or values), call this method first and then call the FieldInfo object's GetValue or GetValueAsList methods.

You can use a field path name as the argument to this method. For more information, see "Using field path names to retrieve field values".

Syntaxe

VBScript

entity.GetFieldValue(field_name) 

Perl

$entity->GetFieldValue(field_name); 
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).
field_name
A String containing a valid field name of this Entity object. You can also use a FieldPathName.
Return value
The FieldInfo object corresponding to the specified field.

Exemples

VBScript

set sessionObj = GetSession 

' Iterate through the fields and output 
' the field name and type. 
fieldNameList = GetFieldNames 
For Each fieldName in fieldNameList
   fieldValue = GetFieldValue(fieldName).GetValue 
   sessionObj.OutputDebugString "Field name: " & fieldName & _ 
          ", value=" & fieldValue 
Next 

Perl

$sessionobj = $entity->GetSession();



# Iterate through the fields and output 

# the field name and type. 



$fieldnamelist = $entity->GetFieldNames();

foreach $fieldname (@$fieldnamelist)

   {

$fieldinfoobj = $entity->GetFieldValue($fieldname);

$fieldvalue = $fieldinfoobj->GetValue();

   $sessionobj->OutputDebugString("Field name: ".$fieldname. ",
          value=".$fieldvalue);

 } 

Commentaires