Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 mrbqlik2009
		
			mrbqlik2009
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I have listbox with 3 item 'test1', 'test2', 'test3'..
i have 2 user in section access 'user1', 'user2'.
I want when user 1 login to system see all listbox item, but when user2 login, just see 'test1' and 'test2'.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In that case, you can try this
If(OSUser() = 'User2', Aggr(Only({1<item = -{'test3'}>} item), item), item)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be like this
If(OSUser() = 'User2', Aggr(Only({<item = {'test1', 'test2'}>} item), item), item)
 mrbqlik2009
		
			mrbqlik2009
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you. it work.
but another question. suppose we have 20 item in listbox and we want just one item hide in listbox.
we should write 19 item in expression?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		In that case, you can try this
If(OSUser() = 'User2', Aggr(Only({1<item = -{'test3'}>} item), item), item)
 mrbqlik2009
		
			mrbqlik2009
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		this expression If(OSUser() = 'User2', Aggr(Only({1<item = -{'test3'}>} item), item), item) give error.
because that -{'test3'}.
I think "-" before {} is incorrect syntax.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Ignore the syntax error shown by the expression editor and click ok to see if it works or not... expression editor can be misleading at times
 mrbqlik2009
		
			mrbqlik2009
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		That's work.
Thank you.
