Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 bharath28
		
			bharath28
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Experts,
I am using match function to expand a variable in 2nd parameter and give the position and the pick function to expand and return the result of the variable.
='Sales by ' & Pick(match(GetCurrentField([Group]),'No','=''$(vProdAlias)'''),'No1','=''$(vProdAlias)''')
Thanks!
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this expression:
='Sales by ' & Pick(Match(vGroup, 'No', '=' & Chr(39) & chr(36) & '(vProdAlias)' & Chr(39)),'No', vProdAlias)
 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This should do it:
='Sales by ' & Pick(Match(GetCurrentField([Group]), 'No', '$(vProdAlias)'), 'No1', '$(vProdAlias)')
 
					
				
		
 bharath28
		
			bharath28
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Jonathan,
Thanks for the reply. However the expression is still not working.
Could you please use the app
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this expression:
='Sales by ' & Pick(Match(vGroup, 'No', '=' & Chr(39) & chr(36) & '(vProdAlias)' & Chr(39)),'No', vProdAlias)
 
					
				
		
 bharath28
		
			bharath28
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks a lot Sunny! It is working
Just to have a better understanding could you please tell me why chr().
I understand that we have to store ='$(vProdAlias)' as string. But why it doesnt work with escape characters-
'=''$''(vProdAlias)'''''
But it works with your solution(with chr())??
'=' & Chr(39) & chr(36) & '(vProdAlias)' & Chr(39)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Chr(36) is a dollar sign which doesn't get evaluated, but $ this gets evaluated. That's the way it works, don't really know why though 
Best,
Sunny
 
					
				
		
 bharath28
		
			bharath28
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks for the help!
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Not a problem 
I am glad I was able to help.
Best,
Sunny
