Skip to main content

FieldValue - script and chart function

FieldValue() returns the value found in position elem_no of the field field_name (by load order).

Syntax:  

FieldValue(field_name , elem_no)

Return data type: dual

Arguments:  

Argument Description
field_name Name of the field for which the value is required. Must be given as a string value. This means that the field name must be enclosed by single quotes.
elem_no The position (element) number of the field, following the load order, that the value is returned for.

Limitations:  

If elem_no is larger than the number of field values, NULL is returned.

First name Initials
John JA
Sue SB
Mark MC
Peter PD
Jane JE
Peter PF

Examples and results:  

The following example uses two fields: First name and Initials.

Examples Results

FieldValue('First name','1')

John as John appears first in the load order of the First name field. Note that in a filter pane John would appear as number 2 from the top, after Jane, as it's sorted alphabetically and not as in the load order.

FieldValue('First name','7')

NULL as there are only 6 values in the First name field.

Data used in example:

Initials:

LOAD * inline [

"First name"|Initials|"Has cellphone"

John|JA|Yes

Sue|SB|Yes

Mark|MC |No

Peter|PD|No

Jane|JE|Yes

Peter|PF|Yes ] (delimiter is '|');

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!