Brian Dunning's FileMaker Custom Functions

URLEncode ( url )

Encodes a url

  Average rating: 4.7 (20 votes) Log in to vote

Tony Tanevski   Tony Tanevski - Show more from this author
Hi-Voltage
http://www.hi-voltage.com.au

Share on Facebook Share on Twitter

  Sample input:
URLEncode ( "http://google.com/test page" )
  Sample output:
http://google.com/test%20page

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

Use this custom function to encode your urls. For example, a space in a url is not a valid character, but encoding it with %20 is valid.

Enjoy.
Regards
Tony Tanevski
Hi-Voltage, Melbourne Australia

 

Comments

unin   unin, Japan
Oct 26, 2015
Your sample is wrong. : and / and . in the parameter will be encoded in the result. You need encode each component of URL.
 
Tony Tanevski   Tony Tanevski, Melbourne
Oct 26, 2015
fixed - thanks for letting me know.
 
Menno   Menno, Netherlands
Dec 29, 2015
the characters !'()* are allowed in URL's and don't need to be encoded.

Since FileMaker 8.5 there is the function:

GetAsURLEncoded ( tekst )

which does the same as your CF
 

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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: