Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 -
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)
Try this.
SubField('Test - Test Bed 1 - New Form - 1110012','-',SubStringCount('Test - Test Bed 1 - New Form - 1110012','-')+1)
That gives me what is to the right of the final (-) which is 1110012. I need what is to the left of it.
Ohh My bad, sorry I misunderstood it. I will send you the new expression.
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)
another possible solution might be:
Left('Test - Test Bed 1 - New Form - 1110012',Index('Test - Test Bed 1 - New Form - 1110012','-',-1)-1)