ListField

Version 2

     

    Calculation

     

    Compatibility
    Creator
    Mac OS X, Windows
    Duane Weller
    FMP 8.5, 9, 10, 11
    Web: Yes
    File Type: None
    Server: Yes
    FileSize: 0 kilobytes
    http://

    Description

    Creates a value list of a field based on the current records found.

     


    Code

    // -------------------------------------------------------

    // Title: ListField

    // Purpose: Creates a value list of Field

    // Version Required: 8.5

    // Custom Functions Required: ListField() (recursive)

    // Updated On: 6/7/2007 by Duane Weller

    // -------------------------------------------------------

     

    // Syntax: ListField ( Field)

     

    // Parameters

    // Field - A field you wish to create a value list of

     

    // This function will create two global variables called $$CF_ListField_Record and $$CF_ListField_Value

     

    Let ( [

    theField = Field ;

     

    // Initalize the record number global

    $$CF_ListField_Record = If ( $$CF_ListField_Record < 1 ; 1 ; $$CF_ListField_Record );

    currRecord = $$CF_ListField_Record;

     

    $$CF_ListField_Value = GetNthRecord ( theField ; $$CF_ListField_Record ) & "¶" & $$CF_ListField_Value ;

    theValue = $$CF_ListField_Value;

     

    //Save or reset the globals

    $$CF_ListField_Record = If ( currRecord ≥ Get ( FoundCount ) ; 0 ; $$CF_ListField_Record + 1 );

    $$CF_ListField_Value = If ( currRecord ≥ Get ( FoundCount ) ; "" ; $$CF_ListField_Value )

    ] ;

     

    If ( currRecord = Get ( FoundCount ) ; theValue ; ListField ( theField ) )

     

    )

     

    Sample Input

    Sample Output
    ListField ( Field)

    Record A

    Record B

    Record C

    etc.


    Developer's Notes

     

     


    FileMaker Inc. provides this content on an “As Is” basis, without any warranty, and subject to the terms of the FileMaker Technical Network Agreement. FileMaker makes no representations and is not liable for any content or related information. You may use the content as part of your own solutions and for your customers, but you may not otherwise publicly distribute any content that you did not submit. ©2009-2011 FileMaker, Inc. All Rights Reserved. FileMaker is a trademark of FileMaker, Inc. registered in the U.S. and other countries.