Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 ni_avoss
		
			ni_avoss
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		hi there,
in the frontend I want to combine the functions getfieldselections & getselectedcount to dynamically show fieldselections, based on the number of selections.
the problem: both return different fieldcount.
I found out that getselectedcount has the parameter IncludeExcluded, which defaults to false. If set to true() both functions return the same fieldcount so I guess getfieldselections includes excluded values which is quite confusing.
Is there any way to not include exluded values in getfieldselections() ? Or any different ideas for a workaround?
thanks,
alex
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be use Concat() instead of GetFieldSelections?
If(GetSelectedCount() > 0, Concat(DISTINCT FieldName))
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be use Concat() instead of GetFieldSelections?
If(GetSelectedCount() > 0, Concat(DISTINCT FieldName))
 ni_avoss
		
			ni_avoss
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		well, yeah that might be an idea. the useful parameter in that function was that it automatically switches from concatenation to a summary ("x of y") after hitting MaxValues. But I guess I can rebuild this more or less if there is no other way
thanks
 ni_avoss
		
			ni_avoss
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		oh just tried this. concat() also return exluded values, thus will not work
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Concat() includes excluded values, can you share a sample of what you trying to get?
 
					
				
		
=if(Aggr(Sum(1), FIELDNAME)>0,
'Selected: $(=Concat(DISTINCT FIELDNAME, ', '))',
'Others: $(=Concat({<FIELDNAM=E({$})>} DISTINCT FIELDNAME, ', '))')
 ni_avoss
		
			ni_avoss
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		let me try to explain:
I got two boxes. One which is a standard listbox, second is a summary of the selection (works similar to text field). Basically I try that both boxes show the same.
The problem: when extending my selection (to other fields), the selection within the listbox shrinks accordingly to what is really shown. Not so in the summary box which uses now the following expression (GetFieldSelections just got replaced with concat):
=if(GetSelectedCount(Channel)=0,'Channel',
if(GetSelectedCount(Channel)>5,GetSelectedCount(Channel)&' Channels',
Concat(Channel,', ')))
is that clear ?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		So you are saying that Concat() is showing Channels which are not selected?
 ni_avoss
		
			ni_avoss
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		they have been selected before but further selection excludes values from the initial selection
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I think the best would be if you provide a small example.
- Marcus
