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
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
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.

Under construction. Email me your wish list for improvements.