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
getting information from a table field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
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.
Hope this helped,
Jan Schenkel.
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
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
-
- Posts: 137
- Joined: Thu Jul 24, 2008 11:22 pm
got it sorted - many thanks
got it sorted
many thanks
many thanks