Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Since we got this nice database for JavaScript to do custom functions (see blog article: Custom Functions in JavaScript), we further thought about doing this with FileMaker directly. Imaging to have your custom function in a central start database. Your solution opens, defines your own environment to store them and then loads all your custom functions from a table in the database. You may even have flags to define which are active vs. inactive, testing vs. production quality or maybe limited to admins. Once you have them loaded in memory, you can call them anywhere in any open file as long as FileMaker is running.

Here is our example database:
FileMakerCustomFunctions.jpg
As you see we can define functions with as many parameters as needed. Then you enter the body of the function with whatever code you have in your custom functions. We got a button for macOS to format the calculation with our Syntaxcoloring functions. Then we got a button to check errors, which will let FileMaker parse your code with the parameter definition included, so we can find syntax errors. Sadly we can't tell where the error is exactly, but we may tell you if the syntax is okay or what error code we got. 

Our start script set ups a global dictionary named "CF" in our example using Dictionary.CreateNamed function. Then you add functions there with Dictionary.SetValueForKeyone by one or with Dictionary.AddSQL function as a block. Each function would have comments in front to name the parameters. We use "/// " & $name there, e.g. "/// value". 

Then later you can call the custom function with our FM.CF function. You pass the dictionary identifier, "CF" in our example. Then you pass the name of the function (case sensitive) and the parameters. As many parameters as you need, so you may define your function with 10 parameters, but only pass 2 or 3 depending on what you do.

The dictionary is global for all files and all solutions opened in FileMaker and can be initialized in FileMaker Pro, Server (Scripting + Web Direct) as well as FileMaker iOS SDK based applications. Since we use a dictionary identifier, you can have different sets of custom functions in different namespaces.

Please try the JS.CF function with MBS FileMaker Plugin in version 11.3pr3 or later.

  • 4 weeks later...

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.