Date Range Chooser


Are you looking for a reusable tool to be integrated with your FileMaker solution that provides an easy to use date range chooser popup window? Look no further! Portage Bay has created the Modular Date Range Chooser which can easily be added to your solution, either by copying and pasting the components into your existing solution, or linking the file as an external widget file.

Preset Date Ranges

After the script is called to open the Date Range Chooser window, the script will pause, allowing the user to interact with the chooser, entering either a custom date range or selecting one of the preset date ranges. The preset date ranges are as follows:

  • Today
  • Yesterday
  • Last Seven (last seven consecutive days, inclusive of today)
  • Last Week (last full week Monday through Sunday prior to today)
  • Month to Date (first day of the current month throughout today)
  • This Month (first day to last day of current month)
  • Previous Month (first day to last day of prior month)
  • Year to Date (first day of current year through today)
  • This Year (first day to last day of current year)
  • Previous Year (first day to last day of prior year)

Error Validation

If there are any errors such as an invalid date range, missing end date, or missing start date, error text will display in red and you will be unable to continue the date selection process without correcting the date range. The cancel button will of course still be available.


  • Must be FileMaker version 16+ ( the technique uses JSON in the required scripts)


INTEGRATION A: Install as Widget (Preferred Integration)

  1. Host this file on your server (if your solution is hosted) or put in the same folder as your main solution.
  2. Create a new script in your main solution that has the following steps (see DateRange Example for an example). You can also copy and paste the DateRange_Example script into your main file and edit it as needed.
    •  Perform script from external file (this file) called “DateRange_Controller”, passing any optional parameters as json
    • Capture script result after “DateRange_Controller”. The script result is retuned as json, so it will need to be parsed for start and end dates.
  3. Open your solution and add a button to the layout where you’d like to call the DateRange chooser pop up from. Attach the script you created in step 2.

INTEGRATION B: To copy this example into your solution

  1. Copy the table “DateRange” into your solution. (This step is not necessary if you already have two global date fields in your solution – one for Start Date and one for End Date)
  2. If you followed Step 1, a layout should have automaticaly been created in your solution called “DateRange”. If you did not do step 1, please add a new blank layout called “DateRange”. The Table Occurence is not relevant as there will only be two global fields on this layout. Make sure this layout is using the “Universal Touch” theme or “Minimalist” theme. Delete the Header and Footer Parts. Delete any objects from this layout.
  3. Copy custom functions “WindowInfo” and “WindowCenter”
  4. Copy the entire script folder called “DateRange”
  5. Copy all objects on the layout called “DateRange” and paste them in your solution on the “DateRange” layout. These objects are using the Universal Theme layout available only in FM 17, however copying and pasting into FM16 will still keep the styles. You will also need to resize the vertical and horizontal size of the layout fit the layout objects.
  6. Update the “DateRange Settings” script to point to the global date fields you wish to use as your Start Date and End Date. If you followed step 1, and are using the global date fields from the DateRange module, you will not need to update this script.


To test the DateRange module (or implement it as button), you can add a button to any layout in your solution. Attach the script called “DateRange Example” to the button.

The parameters are all optional, but we’ve added them to give you more options to control the size and location of the window. All parameters are passed as a JSON object. If you are unfamiliar with JSON, please see the “DateRange_Example” script for an example of how to format it. Below are the three optional parameters. If no parameters are passed, the window will default to a Card window centered within the parent window.

  • Left: Number of pixels window should appear from the left edge of the parent window.
  • Top: Number of pixels window should appear from top left edge of the parent window.
  • Window Type: Either “Card” or “Dialog” (a Card window is stationary, automatically dims the background of the parent background and cannot be moved, whereas a Dialog window can be moved although the background will not be dimmed).


The module can be downloaded over at the Portage Bay Solutions blog page


TimePop creates a simple time picker in a popover or card window for setting a time field or variable. It uses an intuitive interface to streamline the user experience. Bootstrap’s DateTime picker inspired the look and feel.

TimePop is incredibly easy to install and use. It requires no additional modules or custom functions. Once TimePop is installed, you only need to copy the popover button or card opening button to your layout and change the script parameter to match the name of the field you want to set.

TimePop now supports timestamps thanks to Jeremiah Small!





Download Latest Version From Github






Suggestions welcome!


Github: Feel free to improve at will.


Version History:

  • 1.0.0. — 2018-03-16 — Initial build
  • 1.0.1. — 2018-06-12 — Minor changes.
  • 2.0.0 — 2018-06-16 — Now supports Timestamps and Card Windows!

Modular Dialog


Dialogs are nothing new. As a developer, it’s the primary form of developer-to-user communication. FileMaker’s “Show Custom Dialog” functionality is great for showing errors and gathering bits of input before, during, and after a call stack. FM’s dialog does come with its own set of limitations. There are times when a dialog would be helpful, but the “Show Custom Dialog” script step is not exactly suited for the situation. First, FM’s dialog waits for user input, pausing the script until input has been received, but user input is not always necessary. Second, if a script is running that, for one reason or another, requires time to complete, the user is stuck in this “waiting state” with no clear indication of what the current script is doing. They may see an asynchronous progress indicator or Spinning Wheel of Death (or SWOD, as the kids say), but no real indicator that something is supposed to be happening. Third, FM’s dialog window size and location is stored within the confines of the FileMaker Pro app library, not controllable by the developer.

The “ModularDialog” module can be used to display a dialog while allowing for little to no user interaction. It can be used as a simple Info/Warning/Error notification or for alternative purposes, like showing progress indicators, records counts, etc. Designed to be easily copied into a solution, it uses a few basic FileMaker objects, a slide control panel, and one simple script used to show or hide the dialog.

Using the module is simple. Copy and paste the module script folder “ModularDialog”, then copy and paste the grouped object onto any layout. The objects are grouped in a particular way so it can be easily resized. Call the script “ModularDialog” and pass the text to be shown in the dialog. To clear the dialog, click the dialog box or call the same script and pass empty variables. For example, to hide the dialog after a number of seconds, use the “Install OnTimer Script” to call the “ModularDialog” after the specified interval. The included script “ModularDialog Example” gives an example of how to show and hide the dialog, using the “Install On Timer” script step.


  • Must be FileMaker version 13+ (required for using the slide control object)


  1. Copy or import the ModularDialog script folder to your solution
  2. Copy the grouped ModularDialog Slide Panel Object to each layout in the solution where the dialog is needed
    • In the example file, go to Layout Mode, and the object will be visible in the upper-right corner of the “PBS” layout
  3. Paste and set the object in the desired location. Typically, this would be in the upper-right corner of the layout.


To show the module, call the script “ModularDialog Controller” and pass the following parameter:

Let (

 $$ModDialog = "This is an info dialog" ; 
 $$ModDialogType = "Info"

To hide the module, click the dialog or call the script “ModularDialog Controller” and pass the following parameter:

Let (
 $$ModDialog = "" ; 
 $$ModDialogType = ""


The module can be downloaded over at the Portage Bay Solutions blog page