Re: fileMaker Value Lists
Re: fileMaker Value Lists
- Subject: Re: fileMaker Value Lists
- From: David Crowe <email@hidden>
- Date: Thu, 13 Sep 2007 16:41:30 -0600
Title: Re: fileMaker Value Lists
Oakley;
You need add AppleScript code like:
set applescript's text item delimiters to
return
set theList to every text item of (cell
"ValueListItems" of current record)
Note that the list may have a null string at the end (AppleScript
apparently sees a delimiter as separating two items, so the last
return has an imaginary null string after it). That's easy to remove,
however.
Regards,
David Crowe
At 2:23 PM -0700 9/13/07, Oakley Masten wrote:
David
This could be an excellent technique for lots of
things.
It works quite well. But I am missing a part.
When I load the cell into a variable I can't figure
out how to access each item.
tell application "FileMaker Pro"
tell database
"MAPS_2_Quark.fp7"
set
theList to (cell "ValueListItems" of current
record)
set
countChoices to count of items in theList
end tell
end tell
set theList
to (cell "ValueListItems" of current
record) as text
set theList to (cell "ValueListItems" of
current
record) as list
This gives the list as you said but the countChoices
is 549 [characters] in text mode and 1 in list mode.
It should have been 36 items.
How do I get access to them individually as items?
Do I have to set some sort of delimiter variable for
the list?
I guess my real question for you is how do I process a
Carriage-Return list that doesn't count items by
Carrrage-Returns.
I am lost here.
thanks
Oakley
--- David Crowe <email@hidden> wrote:
> It appears that my solution got lost.
>
> 1. Define a calculation field in FileMaker with the
> "ValueListItems" function.
>
> 2. Access this calculation field from AppleScript in
> the normal way.
> The FileMaker function gives you a carriage-return
> delimited list,
> which is I believe what you wanted.
>
> - David Crowe
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden