ValueListItems()

Category: Design

Syntax: ValueListItems ( fileName; valueListName )


Parameters:

fileNameA string or text expression that represents the name of an open file.

valueListThe name of a value list in fileName.

Data type returned: Text

Description:

Returns a carriage returndelimited list of the items in the specified value list.

The ValueListItems() function is often used to consolidate information about a set of related records. For instance, in an invoice file, you might have a value list called Products_Ordered thats defined to return the ProductName field from a related set of records in the InvoiceItem table. ValueListItems (Get (FileName); "Products_Ordered") would return a list of all the products ordered on the current invoice.

As with many design functions, we recommend against hard-coding specific text strings into calculations, but in this case it cannot be avoided. One practice we follow in our work is to name value lists that are referenced elsewhere by name with a suffix "DNR" for "do not rename." Another approach is to create a custom function that returns value list names and thus provides a single place to control edits.

Examples:

Function

Results

ValueListItems (Get (FileName); "Phone_Label")

Returns a list of values from the value list Phone_Label in the current file that might look like this:

 

Home

 

Work

 

Cell

 

Fax








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

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