Brian Dunning's FileMaker Custom Functions

Char0 ( )

Return a string with a single character 0 for use to clean fields containing such characters.

  Average rating: 3.0 (2 votes) Log in to vote

Ole Kristian Ek Hornnes   Ole Kristian Ek Hornnes - Show more from this author
ProgramDesign
https://programdesign.no

Share on Facebook Share on Twitter

  Sample input:
Char0 ()
  Sample output:
String containing a \0x00

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

Especially from FMP11 bases, some fields contains a char(0) inside the field. Sure how it got there, but difficult to clean - and creates potential problems when exporting to various file formats, like XML. The XML becomes invalid.

As the constant char(0) is treated as an empty string, you cannot use it as an argument in a substitute function. Instead use this function, or write Base64Decode ( "AA==" ) that returns a string containing a single character 0.

For FileMaker versions before 14, this function is absent, but you can use the free BaseElements plugin instead, having BE_base64_decode function that works in exactly the same way.

 

Comments

Omelyan Burtnyk   Omelyan Burtnyk, Go To Logistics
Feb 19, 2018
Thank you Kristian!
Good idea
 

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: