Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
teempi
Partner - Creator II
Partner - Creator II

GetFieldSelections() problem

Hello,

I have a calendar component that lets users choose years, months and days to analyze. I'm using a set analysis statement that forces the calculations to use the same date information (day, month, year) as selected elsewhere in a few expressions. I've made variables that have values (in short) GetFieldSelections(Year), GetFieldSelections(Month), GetFieldSelections(Day). I use those variables in the set analysis statements.

If I select days 1, 2 and 3 for example, everything works like it's supposed to. If I increase the amount of selections to 1,2,3,4,5,6,7, the current selections box displays my selections like this: (7 of 31). At the same time my expressions stop working and nothing is printed. GetSelectedCount() returns 7 like it's supposed to but for some reason the GetFieldSelections() -function won't return any selections. Or it might return something but definately not the ones I've selected.

Any tips?

1 Solution

Accepted Solutions
Not applicable

Hi,

what are QV HELP is saying: Look for MaxValues ...

Maybe the only thing you need is to increase the number for MaxValues.

getfieldselections ( FieldName [, ValueSep [, MaxValues]] )

Returns a string with the current selections in a field.

ValueSep is the separator to be put between field values. The default is ', '.

Maxvalues is the maximum number of field values to be individually listed. When a larger number of values is selected the format 'x of y values' will be used instead. The default is 6.

Examples

getfieldselections ( Year )

getfieldselections ( Year, '; ' )

getfieldselections ( Year, '; ' , 10 )

Rainer





View solution in original post

4 Replies
Not applicable

Hi,

what are QV HELP is saying: Look for MaxValues ...

Maybe the only thing you need is to increase the number for MaxValues.

getfieldselections ( FieldName [, ValueSep [, MaxValues]] )

Returns a string with the current selections in a field.

ValueSep is the separator to be put between field values. The default is ', '.

Maxvalues is the maximum number of field values to be individually listed. When a larger number of values is selected the format 'x of y values' will be used instead. The default is 6.

Examples

getfieldselections ( Year )

getfieldselections ( Year, '; ' )

getfieldselections ( Year, '; ' , 10 )

Rainer





Not applicable

The default is 6:

GetFieldSelections (field_name [, value_sep [, max_values=6]])

Regards,

Gordon

teempi
Partner - Creator II
Partner - Creator II
Author

That did the trick, thank you so much! Now I feel ashamed for not figuring that out myself 🙂

Not applicable

It doesn´t matter.

That´s one of the reasons the community is good for:

Helping out each other ...

Rainer