I am breaking does case numbers that are in many different lengths and ranges. I have most of the case numbers broken down, but now I'm having a problem converting my year field to differentiate between case numbers from 1999 and under and 2000 and over.
Here are my examples:
GV101549 converted to GV01001549 (this works)
GV9300521 should covert to GV9300521 (this does not work)
Here is my code:
if mid(ToNumber({TXEVNTD.EI2CASNUM},3,2)< 50) then
(If Len({TXEVNTD.EI2CASNUM})=7 then
"00" else
If Len({TXEVNTD.EI2CASNUM})=8 then
"0"& trim(mid(totext({TXEVNTD.EI2CASNUM}),3,1))else
If len({TXEVNTD.EI2CASNUM})=9 then
"0" & trim(mid(totext({TXEVNTD.EI2CASNUM}),4,1))else
if len({TXEVNTD.EI2CASNUM})=10 then
trim(mid(totext({TXEVNTD.EI2CASNUM}),3,2))else
if len({TXEVNTD.EI2CASNUM})=11 then
trim(mid(totext({TXEVNTD.EI2CASNUM}),3,2)))
Here are my examples:
GV101549 converted to GV01001549 (this works)
GV9300521 should covert to GV9300521 (this does not work)
Here is my code:
if mid(ToNumber({TXEVNTD.EI2CASNUM},3,2)< 50) then
(If Len({TXEVNTD.EI2CASNUM})=7 then
"00" else
If Len({TXEVNTD.EI2CASNUM})=8 then
"0"& trim(mid(totext({TXEVNTD.EI2CASNUM}),3,1))else
If len({TXEVNTD.EI2CASNUM})=9 then
"0" & trim(mid(totext({TXEVNTD.EI2CASNUM}),4,1))else
if len({TXEVNTD.EI2CASNUM})=10 then
trim(mid(totext({TXEVNTD.EI2CASNUM}),3,2))else
if len({TXEVNTD.EI2CASNUM})=11 then
trim(mid(totext({TXEVNTD.EI2CASNUM}),3,2)))