Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ArgumentTypeDescription
setRecordset

The recordset to get the fields list from.

Get fields will return each fieldname field name defined for the record as an array, except for special internal field names.

Example

...

The getFields function will return a list of field names. These can be extracted using normal array functions and assigned to a variable.

$fields = getFields(in)

...

 //

...

["foo",

...

"bah",

...

"field3"]

...

$field  =

...

$fields[

...

1]       //

...

$field

...

=

...

"foo"

...

$value  = in.$field

...

         //

...

equivalent

...

to

...

in.foo

The getFields function will return a list of field names. These can be extracted using normal array functions and assigned to a variable.The dot notation supports dynamic access to fields when variables are used within the expression, in this case, $field = "foo" so in.foo will be assigned to $value.

See Also


Excerpt
hiddentrue

getFields(set) Gets the field names of a record