StNo Street Name
18880 Nordhoff Street #6
Desired result should be
StNo Street Name
18800 Nordhoff Street #6
The code below successfully copies just the street number away from the street address field and places it in the StNo field.
But it does not delete the street number from the original street address filed
leaving just the street name and all elements to the right of street name.
ANY IDEAS ON HOW TO DO THAT?
Thanks . . . Rick
method run(var eventInfo Event)
{breakApart method. This syntax is used to separate
the street number from the street name}
Var
ImpMoore1 table
ar Array[] String
tc tCursor
s,str String
si SmallInt
endVar
{-----------------------------------------------------------------}
addAlias("MYDIR","Standard","D:\\Pdoxwin7\\Moore")
{-----------------------------------------------------------------}
if Not tc.open("D:\\Pdoxwin7\\Moore\\ImpMoore1.db") then
errorShow()
return
endif
tc.edit()
scan tc:
str=tc."AddressDisplay".value ;field name in table
str.breakApart(ar, " ") ;use space as delimiter
for i from 1 to 1 ;limites data to the left of the first space in the field
str=ar[i] ;assigns data to str from left of first space in field
endfor
tc."StNo".value=str ;places str value in StNo field
endscan
tc.close()
endMethod