Category: Text

Syntax: MiddleValues ( text; startingValue; numberOfValues )


textAny return-delimited string or expression that generates a return-delimited string.

startingValueAny positive integer or expression that returns a positive integer.

numberOfValuesAny positive number or expression that returns a positive integer.

Data type returned: Text


Returns the specified number of items from the middle of the text parameter, starting at the value specified in the startingValue parameter.

The MiddleValues() function returns a slice from the middle of a return-delimited array. The output itself will be a return-delimited array, and there will always be a trailing return at the end of the last item.

See the LeftValues() function for a discussion of methods to remove the trailing return from the output of the MiddleValues() function.

The MiddleValues() function is used frequently in scripts to loop over the items in an array. Each time through the loop, you can extract the next value from the array by incrementing a counter. For instance:

 Set Variable [ $counter; 1 ]
 Set Variable [$value; MiddleValues ( $myArray; $counter; 1 )
 { ... some set of operations involving the extracted item }
 Exit Loop If [$counter = ValueCount ( $myArray )]
 End Loop




MiddleValues ("A¶B¶C¶D¶E"; 2; 3)

Returns the following:







MiddleValues (test; 3; 1)

Returns the following:




When test contains:









: FileMaker Specifications

FileMaker 8 Product Line

Specifications and Storage Limits

Field Types and Import/Export Formats

: Calculation Functions

Working with Calculations Primer

Calculation Signatures

Calculation Functions

: Custom Functions

Custom Functions Primer

Useful Custom Functions

: Script Steps

Scripting Primer

Script Step Reference

: Quick Reference

FileMaker Error Codes

FileMaker Keyboard Shortcuts

FileMaker Network Ports

FileMaker Server Command Line Reference

FileMaker XML Reference

: Other Resources

Where to Go for More Information

FileMaker 8 Functions and Scripts Desk Reference
FileMaker 8 Functions and Scripts Desk Reference
ISBN: 0789735113
EAN: 2147483647
Year: 2004
Pages: 352

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net