Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please see attached qvw
Just want specialty code in the specialty portion of selections text box
works great if I pick 6 or less
as soon as I pick the 7th
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
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!
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!
Perfect! Works like a champ
Thanks for the detailed explanation as well!