GetFieldNames

Description

Devuelve los nombres de los campos del objeto Entity.

La lista de nombres se devuelve sin un orden determinado y siempre hay, como mínimo, un campo. Debe examinar cada entrada de la matriz hasta encontrar el nombre del campo que está buscando.

Sintaxis

VBScript

entity.GetFieldNames 

Perl

$entity->GetFieldNames(); 
Identificador
Description
entity
Un objeto Entity que representa un registro de datos de usuario. En un enganche, si se omite esta parte de la sintaxis, se presupone el objeto Entity correspondiente al registro de datos actual (sólo VBScript).
Valor de retorno
Para Visual Basic, un valor Variant que contiene una matriz cuyos elementos son series. Cada serie contiene el nombre de un campo. Para Perl, una referencia a una matriz de series.

Ejemplos

VBScript

set sessionObj = GetSession

' Iterate through the fields and output
' the field name, type, and value
fieldNameList = GetFieldNames
for each fieldName in fieldNameList
   set fieldInfoObj = GetFieldValue(fieldName)
   fieldType = fieldInfoObj.GetType
   fieldValue = fieldInfoObj.GetValue

   sessionObj.OutputDebugString "Field name: " & fieldName & _
      ", type="  & fieldType & ", value=" & fieldValue 
Next 

Perl

# get session object

$sessionobj = $entity->GetSession();



# get a reference to an array of strings

$fieldNameList = $entity->GetFieldNames();



foreach $fieldname (@$fieldNameList)

   { 

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

    $fieldtype = $fieldinfoobj->GetType();

    $fieldvalue = $fieldinfoobj->GetValue();



    $sessionobj->OutputDebugString(

        "Field name: ".$fieldname.", type=".$fieldtype.",

        value=".$fieldvalue);

   } 

Comentarios