Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

ParseData ( theText ; theStartTag ; theEndTag ; theOccurance)

Rate this function:  

  Average rating: 4.0  (50 votes)
  Discuss this Custom Function

Hal Gumbert, MacFL

Extracts text based on a start tag, end tag, and occurance.

Sample Input:
ParseData ( $thePaymentEmail ; "¶Amount: " ; "¶" ; 1 )
Sample Output:

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.


This is great for extracting text within other text. It's especially good for extracting text from forms that are emailed. For example:

If a variable $thePaymentEmail contains:
Subject: Payment Info
Amount: $30.00
Payment Type: Discover
Item: Rockem Sockem Robot
Item: Godzilla Figurine
Order Date: 20060909

ParseData ( $thePaymentEmail ; "¶Amount: " ; "¶" ; 1 ) will return '$30.00'.

ParseData ( $thePaymentEmail ; "¶Item: " ; "¶" ; 1 ) will return 'Rockem Sockem Robot'.

ParseData ( $thePaymentEmail ; "¶Item: " ; "¶" ; 2 ) will return 'Godzilla Figurine'.

Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it


5 most recent comments | Show all 13 comments

Really useful thanks. How would you use it to return the last value (Order Date in your example) ?

How do you define theEndTag for the very end of the text?

Bob, Manchester
December 08, 2016 11:47am

Great time saver, nicely done function.

One caveat and sharing here in case others have same issues:
when importing text files for processing, I got caught out - i was getting nil value returns from this function.
Turns out that the text files (generated in TextEdit) were using Line Feed instead of Carriage Return. Substituting LF for CR did the trick

Just added this prior to calling the function and all was well:
Substitute (theText ; char (10) ; char (13))

Stam, London
September 14, 2017 11:39am

Thanks, great function that save me a load of time! :) Appreciated.

Marcus Holmes, Swansea, UK
September 27, 2017 2:28am

Hope this will help someone...or you may just think "well, that's pretty %^%$ obvious"!

Using the examples above with FM's List() function will fail on the last item, as there isn't a CR here when FM sets the List. FM's list looks like this:¶¶

Instead I set the list as a variable and add a custom marker for the end of each item, like this[End][End][End]

and then call "[End]" in the function, rather than "¶"

Marcus Holmes, Swansea, UK
September 27, 2017 2:40am

This looks potentially useful. Can it be adapted to include attachments? What would be the formula for an attached jpeg or zip.

Nigel, London
January 03, 2018 7:22am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 0 + 9 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. BinToFloat32IEEE ( binary )
  (Wed, Jun 27, 11:01pm)
2. match_WindowName_List ( Window_Names_List )
  (Sun, Jun 24, 8:15pm)
3. match_LayoutName_List ( LayoutNames_List )
  (Sun, Jun 24, 8:09pm)
4. SQL_Creator_Select ( wrapped ; table_name ; layout_name ; using_field_from ; list_fields_only ; use_distinct ; key_field_list ; separator_for_records ; separator_for_fields )
  (Sun, Jun 24, 5:38pm)
5. SortList ( theList )
  (Sat, Jun 23, 8:45am)
6. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
7. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
8. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)

RSS Feed of Custom Functions