Joined: 31 Aug 2010
Online Status: Offline
Posts: 32
Topic: Function to parse out field Posted: 06 Jul 2018 at 3:49am
I currently use the MID function in a formula to parse out a field in a report to a usable value, but the problem now is we are running out of number combinations which has added an extra value sometimes in the field am parsing.
Today I take '0501741_HY44T90' and using mid ({LOC.NAME},2,1)& mid ({LOC.NAME},4,2)&"-"& mid({LOC.NAME},6,2)& mid ({LOC.NAME},9,2) and create '517-41HY'
I need to now take '09002410HY10010' and create '902-410HY'
I need the formula field to be able to do both since we now have a mix. Any insight that could be offered would be appreciated.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 06 Jul 2018 at 6:02am
so are you asking to take one action if the string has a _ and another actin if it does not?
Just adjust your existing code for the
if instr(field,'_')>0 then action 1 else
action 2
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum