Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Johnnyg248
Contributor III
Contributor III

Issue with Getfieldselected after 6

Please see attached qvw

 

 

Just want specialty code in the specialty portion of selections text box

qlikview_list_box_code_description_specialty.png

works great if I pick 6 or less

as soon as I pick the 7th

qlikview_list_box_code_description_specialty_7.png

I would like  specialty to show all 7

 

I know default is 6

Tried increasing to 100 but no luck

guessing has something to do with concat ?

Any help would be appreciated

 

1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

Maybe like this:

 

= 'Membership Type: ' &if(len(Getfieldselections(MemeberShipTypeDescription))=0,Null(),Concat( distinct subfield((MemeberShipTypeDescription),'-',1),','))& chr(13) & chr(13)
& 'Specialty: 		' &if(len(Getfieldselections(SpecialtyCodeDescription))=0,Null(),Concat( distinct subfield((SpecialtyCodeDescription),'-',1),',') )

 

The issue with your expression is, that using Getfieldselections() and selecting all possible values will return the Value='ALL' by default, not the single values

From QV Help:

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

Returns a string with the current selections in a field. It is possible to query an alternate state.

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.

State is the alternate state to query.

The string that is returned can be in these forms:

'x, y,z'If the number of selected values is Maxvalues or less, the string returned is a list of the selected values, separated with Valuesep as delimiter.
'NOT x, y, z'If the number of non-selected values is Maxvalues or less, the string returned is a list of the non-selected values, separated with ValueSep as delimiter, and NOT as a prefix.
'x of y'If the number of selected values (x) is more than Maxvalues, but less than the total number of values (y) less Maxvalues.
'ALL'If all values are selected.
'-'If no value is selected.

 

Hope this helps!

View solution in original post

2 Replies
Frank_Hartmann
Master II
Master II

Maybe like this:

 

= 'Membership Type: ' &if(len(Getfieldselections(MemeberShipTypeDescription))=0,Null(),Concat( distinct subfield((MemeberShipTypeDescription),'-',1),','))& chr(13) & chr(13)
& 'Specialty: 		' &if(len(Getfieldselections(SpecialtyCodeDescription))=0,Null(),Concat( distinct subfield((SpecialtyCodeDescription),'-',1),',') )

 

The issue with your expression is, that using Getfieldselections() and selecting all possible values will return the Value='ALL' by default, not the single values

From QV Help:

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

Returns a string with the current selections in a field. It is possible to query an alternate state.

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.

State is the alternate state to query.

The string that is returned can be in these forms:

'x, y,z'If the number of selected values is Maxvalues or less, the string returned is a list of the selected values, separated with Valuesep as delimiter.
'NOT x, y, z'If the number of non-selected values is Maxvalues or less, the string returned is a list of the non-selected values, separated with ValueSep as delimiter, and NOT as a prefix.
'x of y'If the number of selected values (x) is more than Maxvalues, but less than the total number of values (y) less Maxvalues.
'ALL'If all values are selected.
'-'If no value is selected.

 

Hope this helps!

Johnnyg248
Contributor III
Contributor III
Author

Perfect! Works like a champ

Thanks for the detailed explanation as well!