# Field functions

These functions can only be used in chart expressions.

Field functions either return integers or strings identifying different aspects of field selections.

Use the drop-down on each function to see a brief description and the syntax of each function. Click the function name in the syntax description for further details.

## Count functions

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetAlternativeCount

GetAlternativeCount() is used to find the number of alternative (light gray) values in the identified field.

[**getalternativecount**](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getalternativecount.htm) (field\_name)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetExcludedCount

GetExcludedCount() finds the number of excluded distinct values in the identified field. Only excluded (dark gray) fields are counted. Alternative (light gray) and selected excluded (dark gray with check mark) values are not counted.

[**getexcludedcount**](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getexcludedcount.htm)(field\_name)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetPossibleCount

GetPossibleCount() is used to find the number of possible values in the identified field. If the identified field includes selections, then the selected (green) fields are counted. Otherwise associated (white) values are counted.

[**getpossiblecount**](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getpossiblecount.htm)(field\_name)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetSelectedCount

GetSelectedCount() finds the number of selected (green) values in a field.

[**getselectedcount**](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getselectedcount.htm) (field\_name [, include\_excluded])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetStateCounts

The GetStateCounts() chart function is used to calculate the total number of unique values matching the specified selection states.

[**getstatecounts**](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getstatecounts.htm) (field\_name, state\_name [, state\_type1,...state\_typeN])

## Field and selection functions

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetCurrentSelections

GetCurrentSelections() returns a list of the current selections in the application. If the selections are instead made using a search string in a search box, GetCurrentSelections() returns the search string.

[**getcurrentselections**](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getcurrentselections.htm)([record\_sep [,tag\_sep [,value\_sep [,max\_values]]]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetFieldSelections

GetFieldSelections() returns a string with the current selections in a field.

[**getfieldselections**](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getfieldselections.htm) ( field\_name [, value\_sep [, max\_values]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetObjectDimension

GetObjectDimension() returns the name of the dimension. Index is an optional integer denoting the dimension that should be returned.

[**getobjectdimension**](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getobjectdimension.htm) ([index])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetObjectField

GetObjectField() returns the field expression of the dimension. Index is an optional integer denoting the dimension that should be returned.

[**GetObjectField**](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/GetObjectField.htm) ([index])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/field-functions-charts.htm)

#### GetObjectMeasure

GetObjectMeasure() returns the name of the measure. Index is an optional integer denoting the measure that should be returned.

[**getobjectmeasure**](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/FieldFunctions/getobjectmeasure.htm) ([index])