Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 Andrea_Ghirarde
		
			Andrea_GhirardeHi everyone,
I'm trying to retrieve the current selections in my extension.
I tried the example from QlikView Ajax JavaScript Library but when I select more than 6 values, I get a result in the form "x of y".
Could anyone please help me? Is there a method like the GetFieldSelections in desktop API?
Andrea
 
					
				
		
 patrik_seger
		
			patrik_seger
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
Lets try this then (inspired by Steoel above)... 
Define an "invisible" text property in the Define.xml file:
<Text Expression="=GetCurrentSelections('',':',',',100)"/>
Make it invisible by not supplying any code for this Text input in the .qvpp file.
Then, in JavaScript, read the value of the corresponding text field:
currentSelections = this.Layout.Text##.text;
where ## is the corresponding text number (0 for the first Text in the Definition.xml, 1 for the next and so on).
I use this technique to get the current QlikView version (<Text Expression="=QlikViewVersion()"/>) and it works fine, so this should probably work as well.
Br Patrik
 
					
				
		
 Andrea_Ghirarde
		
			Andrea_GhirardeThanks....we had come to the same conclusion.
 Clever_Anjos
		
			Clever_Anjos
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I would suggest you use the API to do this: http://qlikcommunity.s3.amazonaws.com/misc/symbols/Qv.Document.html#GetCurrentSelections
 
					
				
		
 andrewpettit
		
			andrewpettit
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Do you know of any limitations on this method? I tried using an expression I need as a property but I get an error. If I use the expression "=today()" it works just fine. However my expression does not work. To validate things the expression I am trying to use works fine in a textbox and if I unhide the property I still cannot set the default to my expression and things work, but I can paste it in via the properties dialog and everything works after.
So I can get my extension to work properly but I cannot default the one property to the required value and hide it without error.
