Designing reusable custom functions
ExpertApply naming conventions, parameter design, and documentation practices to create custom functions that are easy to discover and reuse across solutions.
What you'll learn
- How to name custom functions with a namespace prefix
- How to write inline documentation using a top comment
- How to design parameters that are composable and predictable
A well-designed custom function is discoverable by name, self-documenting through its parameter names, and general enough to be copied between solutions. Poor naming and undocumented parameters lead to functions that no developer wants to reuse, or worse, reimplements unknowingly.
1/3
1
Namespace with a prefix
Prefix every custom function with a short namespace that identifies its category or author. This prevents naming collisions when merging solutions.
FileMaker Script
// Good naming with namespaces: Text.TrimMultipleSpaces ( text ) Date.FirstDayOfMonth ( date ) List.RemoveDuplicates ( valueList ) JSON.GetNestedValue ( json ; path ) Math.RoundTo ( value ; decimals )
Case() efficiency and short-circuit evaluationValueListItems and dynamic value lists in calculations
Sign in to track your progress and pick up where you left off.
Sign in to FM Dojo