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

RemoveSmartQuotes (text)

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.1  (38 votes)
  Discuss this Custom Function

Andrew Duncan, Databuzz
http://www.databuzz.com.au

Removes any single or double smart/curly quotes from the specified text (requires FileMaker v10)

Sample Input:
“hello World”
Sample Output:
"hello World"


 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:

FileMaker Pro has the option per file to use smart quotes which are represented as the curly quotation marks and curly apostrophes which is set via the File menu > File Options>Text tab. These smart quotes can cause problems when interfacing with external systems that don't support smart quotes.

This functions uses the new Char function in FileMaker Pro v10 to remove any single or double smart/curly quotes from the specified text and replace them with plain (straight) quotes and apostrophes. (You can make this function work with previous version of FileMaker by copy/pasting an example of each left/right single and double smart quote/apostrophe into the calculation in place of the Char function).

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:

Sample input and output don't follow the CF.

Bart Bartholomay, Vero Beach, FL
February 08, 2010 5:33am

Hi Bart,

Thanks for pointing that out, have just updated it to show the correct sample input/output.

regards,
Andrew

Andrew Duncan, Sydney, Australia
February 08, 2010 1:46pm

Nice work Duncan,

I also learned some syntax tricks within functions.

Saved me some time. :)

Stuart Rechter, Clearview, South Australia
February 04, 2014 6:30pm

I tried adding french chevron style quotes in the function :

[ Char ( 171 ) ; "\"" ] ; // left pointing guillemet ( « )
[ Char ( 187 ) ; "\"" ] ; // right pointing guillemet ( » )
etc…
[ Char ( 8221) ; "\"" ] // right double smart quote

…but it doesn't work ! If I send it :

"«test»"

the function returns a blank string. I must be having a senior moment, as I can't for the life of me see why ;-)

If I send in :
Quote ("«test»")

… that does work, sort of, as expectedly, it returns ""test"".

If I do :
Substitute ( "«test»" ; ["«" ; "\""] ; ["»" ; "\""] )

that returns "test" without problem, but if i add :

["«" ; "\""] ;
["»" ; "\""] ;
etc…
[ Char ( 8221) ; "\"" ] // right double smart quote

…to the custom function, that doesn't work either.

I checked the character codes, which seem correct.

This makes me wonder whether, for me, it's worth using a custom function at all.
All very odd.

Charles, France
August 29, 2015 7:05am

Hi Charles,

I just did some tests using the English version of FileMaker Pro Advanced v13.09 and it's working as expected using your example. If I add:

[ Char ( 171 ) ; "\"" ] ; // left pointing guillemet ( « )
[ Char ( 187 ) ; "\"" ] ; // right pointing guillemet ( » )

it returns the expected result.

Try creating the calculation in the Data Viewer first and see if you can get it to work - that might help identify a possible culprit.

Andrew Duncan, Sydney, Australia
August 30, 2015 3:05am

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 0 + 5 =
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. ProperAllWords ( text )
  (Thu, Dec 14, 5:19pm)
2. MatchExist ( SourceTable.Field ; DestTable.Field ; ReturnField )
  (Thu, Dec 14, 1:07pm)
3. BVR_Format ( bvr )
  (Wed, Dec 13, 5:32pm)
4. NumberToHexadecimal(NumberValue)
  (Fri, Dec 08, 8:54am)
5. Get_BaseTable
  (Thu, Dec 07, 4:27pm)
6. JSONCreateVarsFromKeys ( json ; namespace )
  (Wed, Dec 06, 8:21pm)
7. GetTableNzme ( field )
  (Tue, Dec 05, 9:16pm)
8. TimeFormatAsText ( theTime )
  (Mon, Nov 13, 1:59pm)

RSS Feed of Custom Functions