Field question

Kay C Lan lan.kc.macmail at gmail.com
Thu Jul 19 18:46:13 CDT 2007


Charles,

Stephen and Eric have provided the solution to your problem, here's just one
or two gotchas that you may need to think about to prevent premature loss of
hair further down the track ;-)

If the fields contain small chunks of data then turning them into a Rev list
is very easy:

put field tMyFieldName & comma after tMyData

OR, if you want tab delimited so you put the data into a spreadsheet:

put field tMyFieldName & tab after tMyData

BUT, if any of these fields contain a large amount of text where there is a
possibility that it may include a comma, tab or return character then your
output may not be as expected, ie if you use the return character as
suggested, and you put 10 fields into tMyData, then you'd expect line 10 of
tMyData to contain the data of field No 10, and it will, unless one or more
of the fields already includes a return characters.

This may or may not be a problem in your situation depending on what you
want to do with the combined data. If you are putting all the field data
into a variable so that you can now manipulate it, which is good practice as
it is much faster than constantly manipulating field data directly, then you
need to be confident that 'in field' commas, tabs or returns aren't going to
mess things up for you. There are a couple of ways to work around this, but
the array method already suggested by Stephen is probably the best.

HTH



More information about the use-livecode mailing list