Assuming you have to loop through and so something on each value, you could do something like this. This assumes the table is determined by the first half of each value, and you just need a new record with the data of the second half. For each table, there is a corresponding layout named 632, 652, ...

set alist to {"652/0137", "652/3361", "652/3378", "650/3044"}

set AppleScript's text item delimiters to {"/"}
tell application "FileMaker Pro Advanced"
 tell document 1
  repeat with i in alist
   set alayout to text item 1 of i
   go to layout alayout
   create new record with data {(text item 2 of i) as string}
  end repeat
 end tell
end tell
set AppleScript's text item delimiters to {""}

geoff

On May 11, 2007, at 11:47 AM, Emma Glaisher wrote:

I have to perform an operation on a field which involves GREPing it, so I am using a calculated Applescript. It takes quite a lot of text, and returns a list of the items in it which it recognises as catalogue numbers. Then I want filemaker to do things with this returned data, but I don't know how to
pass it to Filemaker... if you see what I mean.

The return from Applescript is something like:

{"652/0137", "652/3361", "652/3378", "650/3044"}

I'd like to put this list into a variable, or a field, perhaps one at a time - Filemaker will need to make a new record (in a different table) using each of these values. In reality, there are several hundred numbers involved.

How do I tell it to do this? It took long enough to sweat through the
calculated script, and now I seem to have got nowhere!

Any suggestions very welcome, but I won't reply until I've finished riding a
bike through the muddy Lake District on Sunday....

Emma

Reply via email to