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

FilterPartialValues ( values ; string )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.0  (21 votes)
  Discuss this Custom Function

Richard Dyce, Dyce & Sons
http://dyce.com

Exclude values that contain string.

Sample Input:
FilterPartialValues ( "Item List¶item_scripting¶User List¶user_scripting¶Prefs" ; "_scripting" )
Sample Output:
item_scripting
user_scripting


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

Description:

This is simply convenience function, used to search for 'scripting' layouts.
Updated to avoid adding a trailing return

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:

5 most recent comments | Show all 7 comments

Agnès, where exactly are you adding Upper for case-insensitive? Or is that an exercise for the student? ;-)

Richard, Zuchwil
April 26, 2016 7:35am

Agnès, ahem, sorry, but I'm not sure that the non-recursive works for all the same cases:

Assuming your version is implemented (and I haven't screwed up the implementation):

// FilterPartialValues_NR ( values ; string )

// FilterPartialValues_NR ( values ; string )

Let (
[
R = "#" & Substitute ( values ; [ ¶ ; "¶#" ] ; [ string ; string & ¶ & string ] ) ;
Fb = Substitute (
R ;
[ ¶ ; "#¶"] ;
[ string & "#" ; string ]
) & "#"
];

Substitute (
FilterValues ( R ; Fb ) & "[end]" ;
[ "#¶" ; "" ] ;
[ "¶[end]" ; "" ] ;
[ "#" ; "" ] ;
[ string & "¶" & string ; string ]
)
)


Then,

FilterPartial_NR ( "Item List¶item_scripting¶User List¶user_scripting¶Prefs" ; "script" )

returns:

"item_script¶user_script"

Whereas, the original version:

FilterPartialValues ( "Item List¶item_scripting¶User List¶user_scripting¶Prefs" ; "script" )

returns:

"item_scripting¶user_scripting"

:-(

Richard, Zuchwil
April 26, 2016 8:05am

Oh sorry, I'ts an old calc, and I removed that line, I do not know why she was there...
D = FilterValues ( R ; Substitute ( R ; "#" ; "" ) ) without checking calc !

donc :

Let ([

L = "Item List¶Item_scripting¶User List¶user_scripting¶Prefs" ;
Keep = "_scr" ;

R = "#" & Substitute ( L ; [ ¶ ; "¶#" ] ; [ Keep ; Keep & ¶ & Keep ] ) ;
Fb = Substitute ( R ; [ ¶ ; "#¶"] ; [ Keep & "#" ; Keep ] ) & "#" ;
D = FilterValues ( R ; Substitute ( R ; "#" ; "" ) )
];
Substitute ( FilterValues ( R ; Fb & ¶ & D ) & "[NoValue]" ; [ "#¶" ; "" ] ; [ "¶[NoValue]" ; "" ] ; [ "#" ; "" ] ; [ Keep & "¶" & Keep ; Keep ] /* ; [ "[NoValue]" ; "" ] */ )

it's ok

Agnès, France
April 26, 2016 8:45am

For Case no sensitive :

Let ([

L = "Item List¶Item_scripting¶User List¶user_scripting¶Prefs" ;
Keep = Upper ( "_Scr" ) ;

R = "#" & Substitute ( Upper ( L ) ; [ ¶ ; "¶#" ] ; [ Keep ; Keep & ¶ & Keep ] ) ;
Fb = Substitute ( R ; [ ¶ ; "#¶"] ; [ Keep & "#" ; Keep ] ) & "#" ;
D = FilterValues ( R ; Substitute ( R ; "#" ; "" ) ) ;
Result = Substitute ( FilterValues ( R ; Fb & ¶ & D ) ; [ "#¶" ; "" ] ; [ "#" ; "" ] ; [ Keep & "¶" & Keep ; Keep ] )

];
Substitute ( FilterValues ( L ; Result ) & "[NoValue]" ; [ "¶[NoValue]" ; "" ] )
)

but the calc is less pretty ;)

Agnès, France
April 26, 2016 9:02am

CF Description says "Exclude values that contain string."
Would a description such as "Search only values containing string" not be more appropriate ?

Eric, France
April 29, 2016 6:30am

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 6 + 8 =
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. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
2. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
3. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)
4. FieldRepetitionLast ( field ; maxRepetition )
  (Wed, Jun 06, 6:05pm)
5. CountModifiedRecords ( NameTimestampField ; StartTimestamp ; EndTimestamp )
  (Mon, May 28, 8:23am)
6. JSONArrayLength ( JSONArrayStr )
  (Fri, May 25, 7:46am)
7. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)
8. @JSONFormatElements ( json )
  (Tue, May 15, 3:31am)

RSS Feed of Custom Functions