Re: List coersion troubles
Re: List coersion troubles
- Subject: Re: List coersion troubles
- From: has <email@hidden>
- Date: Wed, 5 Mar 2003 23:36:42 +0000
John Tuttle wrote:
I'm trying to grab a comma delimited string from a FileMaker Pro field
and then turn it into a list which will then be placed into another
database record by record.
[snip old code]
======================================================================
on splitText(txt, delim)
set oldTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to delim
set lst to txt's text items
set AppleScript's text item delimiters to oldTIDs
return lst
end splitText
tell application "FileMaker Pro"
tell database 1
set myText to cell "list_cell" of current record
end tell
set myList to my splitText(myText, ",")
go to database 2
tell database 1
repeat with itemRef in myList
create new record
set cell "item" of last record to itemRef's contents
end repeat
end tell
end tell
======================================================================
has
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.