Software Venture Consulting

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

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


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

ExplodedString_Work( field )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.5  (28 votes)
  Discuss this Custom Function

Michael Alexander, none
no website

Exploded String Variant

Sample Input:
The brown fox
Sample Output:
T
Th
The
The
The b
The br
The bro
The brow
The brown
The brown
The brown f
The brown fo
The brown fox
b
br
bro
brow
brown
brown
brown f
brown fo
brown fox
f
fo
fox


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

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

First, thanks to those who came up with the idea to explode stings in order to do searches on a field. The power of this technique is enormous and I did some work to create a slightly different result as well as handle some of the side cases that were not handled well in the previous versions.

The previous version of exploded string did not work for my application, plus I created a bit of parsing to handle input that wasn't clean. The support functions to handle unclean input include:

This handles: Leading Spaces, Trailing Spaces, and double (triple,etc) spaces in the input.

MyExplodedString (field):
ExplodedString_Work(RemoveSpaceSpace(TrimLeftSpace(TrimRightSpace(field))))

TrimLeftSpace(field):
Let ( [ nospaces=Substitute(Field; " "; "") ];
If (IsEmpty(nospaces); ""; Right(Field; Length(Field) + 1 - Position(Field; Left(nospaces; 1); 1; 1 ))))

TrimRightSpace(field):
Let ( [ nospaces=Substitute(Field; " "; "") ];
If (IsEmpty(nospaces); ""; Left(Field; Position(Field; Right(nospaces; 1); Length(Field); -1 ))))

RemoveSpaceSpace(field):
If (PatternCount(field; " ") = 0; field; RemoveSpaceSpace(Substitute(field; " "; " ")))

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

This is my Custom Function and I want to edit it

Discuss:

The above function should be:

Let(Counter = PatternCount(field; " ");
Case(
counter = 0; ExplodedString_Work(field);
counter > 30; "ERROR: too many fields";
ExplodedString_Work(field) & "¶" &
ExplodedString_Work(Right(field; Length(field)-Position(field;" ";1 ; 1)))))

Daniel Harlow, Pasadena, CA
December 10, 2009 5:18am

Doesn't work. You forgot to include an exit condition, it just gives an out of memory error.

Michael Kupietz, US
July 15, 2014 12:29pm

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

Your Name:
City/Location:
Comment:
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 2 + 7 =
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. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)
2. MonthYearList ( startmonth ; startyear ; numbermonth ; short )
  (Mon, Oct 16, 3:38am)
3. ErrorDescription ( errorNumber )
  (Wed, Sep 27, 2:51am)
4. decodeEntities (text)
  (Wed, Sep 27, 1:22am)
5. HexidecimalToNumber ( HexidecimalValue ; counter )
  (Mon, Sep 25, 12:39pm)
6. FixedFieldConverter ( Fieldname ; f1 ; f2 ; f3 ; f4 ; f5 ; f6 ; f7 ; f8 ; f9 ; f10 ; f11 ; f12 ; f13 ; f14 ; f15 ; f16 ; f17 ; f18 ; f1
  (Fri, Sep 15, 12:34pm)
7. ShannonEntropy ( text )
  (Thu, Sep 07, 5:59am)
8. LetterCount ( text ; summary )
  (Thu, Sep 07, 5:53am)

RSS Feed of Custom Functions