Parse with Indirection

Version 2




    Mac OS X, Windows
    Todd Duell
    FMP 8.5, 9, 10, 11
    Formulations Pro
    Web: No
    File Type: FP7
    Server: Yes
    FileSize: ~ .68 megabytes


    Every now and then FileMaker gives us a new trick that allows us to implement and old technique more effectively. The technique that comes to mind is parsing an e-mail and placing the text into the correct field in the database. The old method had us looping through all the fields and comparing the field name against the text in the e-mail field. That worked great except for one problem, you had to name your field in the database exactly the same as the field in the e-mail form. Quite frankly I don't want someone else's bad naming conventions in my files. So along comes FileMaker Pro 8.5 and the Object Name feature. By giving the Object Name of the field the same name of the field in the e-mail form your field name no longer needs to match the e-mail form's field name. However, even more important than this is that the script will now parse the e-mail form with indirection. Indirection means that the script does not have to explicitly specify a field name and the Object Name can be a dynamically assigned variable. Thus, no more looping through fields or explicitly naming the field in a Set Field function. Finally, the last benefit is that the new script method is very short and very easy.




    Sample Input

    Sample Output

    Developer's Notes

    See sample file for full demo and technical article.


    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.