Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

field value and field index explination pls?

field value and field index explination pls?

thanks in advance

1 Reply
jagan
Partner - Champion III
Partner - Champion III

Hi Manoj,

FieldValue() and FieldIndex() are used to get the values or the index of a dimension.  For example

Country

India

USA

UK

Russia

Fieldindex( 'Country', 'USA' )

Will give you the value 2, because USA is in second position.

FieldValue('Country', 2)

Will give you the value USA, because second value in the Country dimension is USA.

From Qlikview help file:

Fieldvalue(fieldname , n)

Returns the field value found in position n of the field fieldname (by load order). Fieldname must be given as a string value, e.g. the field name must be enclosed by single quotes. The first field value is returned for n=1. If n is larger than the number of field values, NULL is returned.

Example:

fieldvalue( 'Helptext', 5 )

FieldIndex(fieldname , value )

Returns the position of the field value value in the field fieldname (by load order). If value cannot be found among the field values of the field fieldname, 0 is returned. Fieldname must be given as a string value, e.g. the field name must be enclosed by single quotes.

Example:

fieldindex( 'Name', 'John Doe' )

Regards,

Jagan.