Software Venture Consulting
ToMarket

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


Brian Dunning
Contact me | vCard


Brian on CNN
Brian on CNN


Brian on CBS Radio


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

UrlEncode ( text )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 3.5  (11 votes)
  Discuss this Custom Function

Jeremiah Small, Soliant Consulting
http://jsmall.us

Converts illegal and reserved URL characters into URL-legal hex code.

Sample Input:
"http://www.database.com/page.php?field=" & UrlEncode ( "¶ \"!#$%&'()*+,-./:;<=>?@[\\]^`{|}" )
Sample Output:
http://www.database.com/page.php?field=%0D%20%22%21%23%24%25%26%27%28%29%2A%2B%2C%2D%2E%2F%3A%3B%3C%3D%3E%3F%40%5B%5C%5D%5E%60%7B%7C%7D


 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:

A complete table of hexadecimal codes can be found here http://www.december.com/html/spec/ascii.html

Be aware that curly quotes (single and double) are high-ascii, and will not be converted with this function. If you need quotes, make sure your input is with straight quotes.

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:

The following version adds in a few more important substitutions...

/* See http://www.faqs.org/rfcs/rfc2368.html for mailto specifications
The following substitutions and their order are important. mailto: will fail without them.
Reserved characterss in a mailto: URL are "-", "&", and "?"
Must escape the % first, before you start adding them in.
Then do spaces and returns.
Stupify quotes and other stuff
Non-breaking space
Does not handle double quotes or tabs (%09)
Could add substitutions for all diacriticals and other less common characters */

Substitute (text;
["%"; "%25"];
[ " "; "%20"];
["¶"; "%0D"];
[ "!" ; "%21" ] ;
[ "$" ; "%24" ] ;
[ "(" ; "%28" ] ;
[ ")" ; "%29" ] ;
[ "*" ; "%2A" ] ;
[ "+" ; "%2B" ] ;
[ "." ; "%2E" ] ;
[ "=" ; "%3D" ] ;
["\“"; "%22"];
[ "\”"; "%22"];
["‘"; "%27"];
["’"; "%27"];
["'"; "%27"];
["…"; "..."];
["•"; "*"];
[ "-"; "%2D"];
["&"; "%26"];
["="; "%3D"];
["?"; "%3F"];
["#"; "%23"];
[","; "%2C"];
[ "/"; "%2F"];
[":"; "%3A"];
[";"; "%3B"];
[ "<"; "%3C"];
[ ">"; "%3E"];
["@"; "%40&quo

Tim Cimbura, Minneapolis, MN
May 01, 2010 7:59pm

The above post got truncated. It won't work as displayed here.

Tim Cimbura, Minneapolis, MN
May 01, 2010 8:00pm

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 9 + 7 =
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. GetResultParameter( ParameterName )
  (Wed, Aug 25, 8:32am)
2. GetListParameter ( ParameterList ; ParameterName )
  (Wed, Aug 25, 8:25am)
3. Standard_Deviation( Field ; MaxLoopCount ; StartIndex ; StdDeviation ; ArithMeanValue )
  (Tue, Aug 24, 10:57am)
4. Arithmetic_Mean ( Field ; MaxLoopCount ; StartIndex ; MeanValue )
  (Tue, Aug 24, 10:51am)
5. Age ( Birth; theDate; Format )
  (Fri, Aug 20, 9:50am)
6. Power ( x ; y )
  (Thu, Aug 19, 5:56am)
7. portal.rowCount ( _name )
  (Sun, Aug 15, 2:41pm)
8. PostPer_Day ( Post; startDate ; finishDate ; returnType )
  (Sat, Aug 14, 2:02pm)

RSS Feed of Custom Functions