Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Need your help again. I’ve two tables, one is Users and the other one is Cases, so I want an expression or code that writes Inactive if the User does not have any cases in the Cases table and Active if the user has cases in the Cases table.
 
					
				
		
.png) JonnyPoole
		
			JonnyPoole
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can you screenshot your data model showing the users and cases table and how (or if) they are linked ?
 Vegar
		
			Vegar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Exists() is a good function to do this.
Try something like this.
Load
Dim1,
Dim2,
UserId
From
Cases.qvd (qvd);
Load
Username,
Exists (UserId) as _hasCase
From
Users.vad (qvd);
-Vegar
 
					
				
		
Hi,
Try add Client as dimension into a straight table, and as a expression write something like:
=if(count(Cases)>=1,'Active','Inactive').
This works if you have linked the Client and Cases table by a key, if not, you must!
