Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi,
I would like to show a straight table with a column "Product Name",
available products are:
A. 1,2, 3.....30 (30 different products from the same family)
B. and also products 100, 101, 102...109 (10 different products from the same family)
C. and also products 110, 111, 112...119 (10 different products from the same family)
D. and also products 120, 121, 122...129 (10 different products from the same family)
If the client purchased Product from B family, show the name, if not,
If the client purchased Product from C family, show the name, if not,
If the client purchased Product from D family, show the name, if not,
show nothing.
How can I create such a logic?
I use
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be something like this:
If(Len(Trim(Product)) = 2, 'A',
If(Match(Product, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109), 'B',
If(Match(Product, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119), 'C', 'D')))
 
					
				
		
cool,
how can I return the specific product (not the family)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Not sure what you mean?
 
					
				
		
Sorry I wasn't clearer,
I would like to present the product name to the user,
according to the logic above

 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Are you trying to do this in the front end of the application or backend?
For backend I would suggest creating a new column for Product Name using Product ID:
LOAD [Product ID],
'Product ' & [Product ID] as [Product Name]
...
FROM Source;
 
					
				
		
 settu_periasamy
		
			settu_periasamy
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be you can try the sunny's solution in opposite way..
like
If(Product<=30,'Product 1-30',
If(Product>=100 and Product<110,'Product 100-109'))
....
....
