Hi Rob,
robm80 wrote:...
Here is the same line now with comma's.
4allclients,
robmeyer@hetnet.nl,11220076,
https://www.4allclients.com,
4AllClients.com? B.V., Opaalstraat 14, 7554 TS Hengelo, 0900-273-8446
...
set itemdel to ","
put item 5 of line tLO of field "DB1" of cd "DB"into tData PROBLEM:
item 5 =4AllClients.com? B.V.,
...
it sound like you do not get the point with ITEMS or ITEMS at all, when you describe this as a problem!
Now that line has 8 (EIGHT) items, OK?
So why not take the FIFTH to LAST item of the line?
No need to change the itemdelimiter!
And there are even more ways to do so:
Code: Select all
...
## We can supply a NEGATIVE number, that the engine will count from the end:
## we take item 5 to the last item (item -1) of the line:
put item 5 TO -1 of line tLO of field "DB1" of cd "DB" into tData
## 1. The "natural" approach:
replace "," with CR in tData
put tData into fld "note"
Code: Select all
## 2. The "programming" approach
put the num of items of tData into itc
repeat with i = 1 to itc
put item i of tData &cr after tVar
filter tVar without empty
end repeat
put tVar into fld "note"
...
Best
Klaus