Exclude ( )

Function stats

Average user rating
5.0000
46
152
9999
Support
FileMaker 8.0 +
Date posted
17 December 2008
Last updated
28 June 2010
Version
Recursive function
No

Author Info
 Agnès

17 functions

Average Rating 4.6

author_avatar



 

Function overview

Prototype

Exclude  ( TextToFilter;   FilterText )


Parameters

TextToFilter  


FilterText  


Description

Tags:  Filter   Exclude  

Exclude the characters to be filtered

-----------------------------------------
it is not a recursive function
-----------------------------------------

limited version : FilterText ≤ 404 characters

For Exclude value on a list, used FilterList()

-----------------------------------------
Respect case sensitive and accents [like Filter()]
Respect smart quotes "”“ and apostrophizes '‘’ [like Filter()]
-----------------------------------------

Examples

Sample input

Exclude ( "Exclude character strings" ; "aeiouy" )


Exclude ( "test Quotes, \“left and right\” quotes" ; "\”" )


Sample output

Excld chrctr strngs


test Quotes, “left and right quotes

 

Function code

// Exclude ( TextToFilter; FilterText ) v3.0

//---------------------------------- Example

// Exclude ( "Exclude character strings" ; "aeiouy" ) Result => Excld chrctr strngs
// Exclude ( "123EbCé789TX" ; "1234567890") Result => EbCéTX
// Exclude ( "d'Eéeè_ àOo" ; "é'E ao") Result => deè_àO
// Exclude ( "test Quotes, \“left and right\” quotes" ; "\”" ) Result => test Quotes, “left and right quotes

/*
Provides an inverse of FileMaker 7's built-in Filter() function.
Exclude the characters to be filtered
[limited version : FilterText ≤ 404 characters - respect case sensitive, quotes and accents, just like Filter()]
*/

//----------------------------------
// @ Agnès. BugReport - filemaker@tictac.fr
// ------------------- "false small recursive"

Let ([

$Exc_Text = TextToFilter ;
$Exc_No = FilterText ;

$Exc_n = 0;
Exc_Calc = Substitute ( ( 10 ^ Length ( $Exc_No ) ) - 1; 9; "Quote ( Middle ( $Exc_No; let ( $Exc_n = $Exc_n + 1; $Exc_n ); 1 ) ) & \"^#|#^\" & " );
Exc_Result = "[" & Substitute ( Case ( not IsEmpty ( $Exc_No ); Evaluate ( Exc_Calc & "\"\"" ) ); [ "^#|#^"; ";\"\"]; [" ] ) & "\"\";\"\"] )"

];
Evaluate ( "Substitute ( $Exc_Text; " & Exc_Result )
)

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/152

    Prototype: Exclude( TextToFilter; FilterText )
    Function Author: Agnès (http://www.fmfunctions.com/mid/46)
    Last updated: 28 June 2010
    Version: 1.2

*/
// ===================================

 

Comments

Agnès
17 December 2008



Hello,

This version is limited => FilterText : 404 characters max

"Unlimited" version is possible but is it necessary ?
you often have more than 400 characters excluded ?

Thanks,

Agnès
(Edited by Agnès on 17/12/08 )
  General comment

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (31)
Date  (28)
XML  (26)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Interface  (15)
Layout  (15)
Text  (14)
Variables  (12)
Layout Objects  (11)
Filter  (11)
Design  (10)
Array  (7)