Hi Ross,

Our posts crossed, but mine made the point that the "+1" part of an
expression like the one you suggest works only if there are, in fact, any
values in the list. So somewhere in there, you need a test of some sort to
make sure you're not adding 1 inappropriately.


John Weinshel
Datagrace
Vashon Island, WA
(206) 463-1634
Member, FileMaker Business Alliance
Certified For FileMaker 8
Certified For FileMaker 7

-----Original Message-----
From: FileMaker Pro Discussions [mailto:[EMAIL PROTECTED] On
Behalf Of Ross Dickson
Sent: Monday, March 31, 2008 9:42 AM
To: [email protected]
Subject: Re: Getting the Count....

Chuck,

Assuming that there is a pilcrow (¶) only between each item, then

   Set Variable [$Count; Value:PatternCount($Variable; "¶")+1]

will put the number of items in $Variable into $Count.

Ross

Chuck Pelto wrote:
> ....of items in a $Variable.
> 
> Pouring over the documentation and not finding anything appropriate, how 
> does one get the number of items—separated by lines—in a ScriptMaker 
> variable?
> 
> E.g., $Variable has these items in it....
> 
> Dog¶Cat¶Chicken¶Fish
> 
> There are four items in $Variable.
> 
> Is there a call or function that will allow me to identify there are 
> four items in $Variable? I can't seem to identify it in the documentation.
> 
> Regards,
> 
> Chuck
> 

Reply via email to