Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Could you help me with the following selection:
I'm trying to select only values for PL_No_ that start with '61'
For this I added an Action under Sheet Properties > Sheet Event Triggers > OnActiveSheet > Select in Field:
Field: PL_No_
Search String: =PL_No_ LIKE '61*'
But this is obviously not working; Can someone tell me what is wrong?
Thxs
.png) 
					
				
		
 Miguel_Angel_Ba
		
			Miguel_Angel_BaHi,
Search String would just be
61*
That should work fine.
Hope that helps.
Miguel
.png) 
					
				
		
 Miguel_Angel_Ba
		
			Miguel_Angel_BaHi,
Search String would just be
61*
That should work fine.
Hope that helps.
Miguel
 
					
				
		
Thanks a lot for the fast response, it indeed worked. Is it also possible to not allow users to clear this selection?
.png) 
					
				
		
 Miguel_Angel_Ba
		
			Miguel_Angel_BaHi,
Yes, add a new action below this one: Action Type Selection, Lock Field, and the field you want to keep locked.
Regards.
Miguel
 
					
				
		
Thanks for the reply.
This is not exactly what I'm looking for, because I still want to be able to make 'subselections' between the different 61* results. Now I can only select all 61* and nothing else. I want to be able to select only 610 and not 611 or 612
Is this possible?
.png) 
					
				
		
 Miguel_Angel_Ba
		
			Miguel_Angel_BaHi,
That's not possible since locking a value in a field actually locks that value, you cannot do a "variable lock". But what you can do is to create a "parent" field in the script, creating a new field that keeps only the two first digits of that field, and do the lock on that field. Using the associative logic, once this parent field is locked, you will be able to select 610 or 611, but not 600 ot 607.
Hope that helps.
Miguel
 
					
				
		
Hi Miguel.
I'm trying to do a simular solution but when I enter the sheet I would like to have the last year and the last month. I have a filed "year" and "month" and I've tried to use settings > sheet propertiies > OnActivateSheet > Add Action > Select in Field > Field =Year Search String =max(Year).
It doesn't work. Du you have a suggestion have to solve it?
Thanks!
.png) 
					
				
		
 Miguel_Angel_Ba
		
			Miguel_Angel_BaHi,
Which version of QlikView are you running? Remove the "=" sign before the field name (Year). The search string should work fine (it's working fine here running versions 10 and 11).
Hope that helps.
Miguel
 
					
				
		
I'm using verion 10 and yes it's working now. But if I would like to have the latest year and the previous month, how to do? If I put two action, one for =max(year) and one for =max(month -1), it's only one of them that is working.
.png) 
					
				
		
 Miguel_Angel_Ba
		
			Miguel_Angel_BaHi,
Try instead
=Max(Month) -1
Hope that helps.
Miguel
