Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 Evan0211
		
			Evan0211
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I am working on a SubString function to get the data to the LEFT of the final dash (-) in the string.
For example:
vString = 'Test - Test Bed 1 - New Form - 1110012'
The expected result would be: Test - Test Bed 1 - New Form
I have used
SubField('Test - Test Bed 1 - New Form - 1110012','-',1)and it works for the first instance of the - (returning Test) but I need to essentially do it in reverse to get everything from the left of the final -
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Here is the expression.
Left('Test - Test Bed 1 - New Form - 1110012',index('Test - Test Bed 1 - New Form - 1110012','-', SubStringCount('Test - Test Bed 1 - New Form - 1110012','-'))-1)
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try this.
SubField('Test - Test Bed 1 - New Form - 1110012','-',SubStringCount('Test - Test Bed 1 - New Form - 1110012','-')+1)
 Evan0211
		
			Evan0211
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		That gives me what is to the right of the final (-) which is 1110012. I need what is to the left of it.
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Ohh My bad, sorry I misunderstood it. I will send you the new expression.
 kaushiknsolanki
		
			kaushiknsolanki
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Here is the expression.
Left('Test - Test Bed 1 - New Form - 1110012',index('Test - Test Bed 1 - New Form - 1110012','-', SubStringCount('Test - Test Bed 1 - New Form - 1110012','-'))-1)
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		another possible solution might be:
Left('Test - Test Bed 1 - New Form - 1110012',Index('Test - Test Bed 1 - New Form - 1110012','-',-1)-1)
