Brian Dunning's FileMaker Custom Functions

|| ( A ; B )

Perl-style or to select values. This is particularly useful for falling back to defaults values.

  Average rating: 5.0 (1 vote) Log in to vote

belg4mit   belg4mit

Share on Facebook Share on Twitter

  Sample input:
||( Field; "Default")
||( 0; 2)
||( 1; 2)
  Sample output:
"Default" // If Field is false (0 or empty)
2
1

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

Perl-style or to select values. Rather than FileMaker's native C-style "or", which casts values to binary for evaluation, || treats non-zero, non-empty values as truth and returns these true values as the result of the expression. This is particularly useful for falling back to defaults values.

 

Comments

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.