Brian Dunning's FileMaker Custom Functions

text.ValidateCharacters ( Text ; Values )

Validate input characters

  Average rating: 4.8 (26 votes) Log in to vote

Rob Poelking   Rob Poelking
Excelisys, Inc.
http://excelisys.com

Share on Facebook Share on Twitter

  Sample input:
text.ValidateCharacters ( "A01-BSD" ; "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ -" )
  Sample output:
1

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Validates text against a given string of acceptable values.

 

Comments

Bart Bartholomay   Bart Bartholomay, Vero Beach, FL
Feb 16, 2010
Rob:

Three comments:

1) Entitle a custom function with parameters in the title

2) The parameters do not have to be dimensioned to themselves in the body of the function. They are there to be used any time they are specifically called.

3) The function can be re-written to a simple boolean calculation per below...

hth,

Bart
----------------------------------------
/*
Name: text.ValidateCharacters
Parameters: Text ; Values
Function:
*/

Length( Filter ( text ; values) ) = Length ( text )

/* Notes: 2010.02.16 - Rob Poelking
rob@ohiokajukenbo.com

Validates text against a given string of acceptable values. */
 
Bart Bartholomay   Bart Bartholomay, Vero Beach, FL
Feb 16, 2010
Rob:

Three comments:

1) Don't entitle a custom function with parameters in the title

2) The parameters do not have to be dimensioned to themselves in the body of the function. They are there to be used any time they are specifically called.

3) The function can be re-written to a simple boolean calculation per below...

hth,

Bart
----------------------------------------
/*
Name: text.ValidateCharacters
Parameters: Text ; Values
Function:
*/

Length( Filter ( text ; values) ) = Length ( text )

/* Notes: 2010.02.16 - Rob Poelking
rob@ohiokajukenbo.com

Validates text against a given string of acceptable values. */
 

Log in to post comments.

 

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

Under construction. Email me your wish list for improvements.