FirstWordValues ( values )

Version 2

     

    Custom Function

     

    Compatibility
    Creator
    Mac OS X, Windows
    Darren Terry
    FMP 8, 8.5, 9, 10, 11
    Pacific Data Management, Inc.
    Web: Yes
    File Type: None
    Server: Yes
    FileSize: 0 kilobytes
    http://www.pdm-inc.com

    Description

     

    This custom function will return a Carriage-Return delimited list of the first words of each value specified in values.

     

    For example, if you submitted “Darren Terry¶John Doe¶Jane Smith” as values, the function would return:

     

    Darren

    John

    Jane

     

     


    Code

    Let ( Num = ValueCount ( Values );

     

    Case (Num = 1; LeftWords(Values; 1);

     

    Let (Rest = RightValues ( Values; ValueCount ( Values ) - 1);

     

    LeftWords ( LeftValues ( Values; 1); 1) & "¶" & FirstWordValues ( Rest ))))

     

    Sample Input

    Sample Output
    John Doe¶Jane Smith¶Carl Jones

    John

    Jane

    Carl


    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.