Page 1 of 1

getting information from a table field

Posted: Tue Aug 05, 2008 2:10 am
by Glenn Boyce
i have a table with 13 columns all up
each line uses a different number of columns but always sequential from LHS
Column 13 always has some information and it is stored as numbers separated by commas. by setting the delimiter to tab I can access all information except the individual items in column 13.
put item 13 of line n of fld "blends" gives me "0.925,0.921,2.02,0.98"

I have tried:

put item 2 of (item 13 of line n of fld "blends") and get ""
put word 2 of (item 13 of line n of fld "Blends") and get ""

any suggestions?

cheers

Glenn

Posted: Tue Aug 05, 2008 5:36 am
by Janschenkel
Hi Glenn,

The first call fails because Revolution uses 'tab' as delimiter for both 'item' chunk extractions - so when it has item 13 there are no more tabs in there, hence getting item 2 of that will return empty.

The second call fails mainly because it is one giant word (no spaces) and Revolution's rules for what constitutes a word will once again mean that word 2 of that will return empty.

You'll have to extract that 'item 13 of line n' chunk into a separate variable, change the 'itemDelimiter' local property and work from there.

Code: Select all

put item 13 of line n of fld "blends" into tItem13
set the itemDelimiter to comma
put item 2 of tItem13
set the itemDelimiter to tab
Hope this helped,

Jan Schenkel.

got it sorted - many thanks

Posted: Tue Aug 05, 2008 6:34 am
by Glenn Boyce
got it sorted

many thanks