<< Click to Display Table of Contents >> Navigation: Available Functions > Char_Filter() |
Syntax
Char_Filter( <CharacterField>, <CharRetain>, <CharOmit> )
Purpose
To return a "filtered" copy of a character field, retaining certain characters while omitting others.
Parameters
<CharacterField> is the field to return a filtered copy of. This can be any character field in DonorQuest.
<CharRetain> is the character or characters to allow to remain in the filtered copy of <CharacterField>.
<CharOmit> is the character or characters to omit from the filtered copy of <CharacterField>.
Returns
A character value.
Usage
You can use Char_Filter() to design reports or mailing labels which remove undesired characters from a field while printing. For example, you could use Char_Filter() to filter out all punctuation characters in addresses, or to remove parenthesis and dashes from telephone numbers.
Example
The following examples illustrate Char_Filter():
CALL |
RESULT |
---|---|
Char_Filter( "123 N. Main St.",, "." ) |
123 N Main St |
Char_Filter( "(415) 572-8188",, "()-" ) |
4155728188 |
Note that the above examples used the <CharOmit> parameter, but they did not use the <CharRetain> parameter. This was done by placing two commas after the <CharacterField> parameter.