SK_May-blog1

What FileMaker Can Offer Your Organization

Your organization faces a unique set of challenges on a daily basis. Tackling those challenges is critical to your team’s continued success; however, doing so may require a solution built around your needs and goals. Many businesses turn to custom-built software solutions to address issues that are constraining growth. But if you have a small or medium-size business, you may be concerned that you don’t have the resources for a custom software platform.

With FileMaker, a customized software platform optimized for your operations may be more feasible than you think. FileMaker has the power to transform the way your organization operates from the inside out. Whether your goal is to increase productivity, or off-the-shelf software is slowing your team down, a FileMaker solution can be built around your needs.

Benefits of the FileMaker Platform

The FileMaker Platform gives your team access to a custom software solution built around their unique workflow and robust capabilities such as:

  • File-sharing
  • Accounting
  • Contact management
  • Sales forecasting
  • Business planning and reporting
  • Lead management
  • Marketing automation
  • Project management

When you elevate your operations with a customized FileMaker solution, your organization can experience benefits like these:

Support for Any Device

Since a FileMaker solution can operate on any Mac or PC, as well as on any native iOS device, and as a web-based platform (which makes it accessible from virtually any device that can connect to the web), users are able to access mission-critical data using any of their favorite Apple,Windows or Android devices. These cross-platform possibilities make it easy to accommodate your team’s device needs. Whether working from a smartphone, laptop, tablet, or a desktop computer, your team will always have access to the same robust FileMaker toolkit.

An Intuitive Interface

With powerful dashboard functionality, FileMaker offers the flexibility to customize a user interface with a quick overview of mission-critical metrics. At the same time, customizable user experience (UX) elements make it easy for your team to hit the ground running on a platform they’re already comfortable using. When you partner with an experienced FileMaker developer, interface elements can be built around the tools your team relies on most for daily tasks, so they can take productivity to new levels.

Data Synchronization

FileMaker makes it easy to access and manage data no matter where work takes you. Remote workers can access files directly from primary systems while updating that same data in real-time, so everyone in your organization stays on the same page. Even without a network connection, FileMaker can be configured to update and merge data as soon as network connectivity is restored. With next-level database management capabilities, you no longer have to worry about misaligned data sources interfering with your operations.

Rapid Deployment

Building a custom software solution using legacy platforms and providers can take anywhere from a few months to as much as a year. With the capabilities of the FileMaker platform, you can gain access to the same customizable software features in a fraction of that time. When you partner with a team of FileMaker experts like the ones at Skeleton Key, you can expect a custom software solution in a matter of days or weeks, giving your team access to the tools they need to succeed today.

Take Advantage of FileMaker Pro

At Skeleton Key, our experts are here to help you explore the possibilities of a FileMaker solution built around your needs. Whether you’re already using a legacy platform that needs updating, or you’re considering a new solution built around your needs, contact us today and we’ll show you how the FileMaker Platform can help you achieve your larger business goals.

Depositphotos 95255062 l 2015

FileMaker 18: Error Logging and Data File Script Steps

With the release of FileMaker 18 comes several new utility script steps. The ability to activate error logging will provide developers and database admins easy access to valuable troubleshooting data that previously existed only via a download from FileMaker Server. This in combination with a full palette of new data file interaction script steps offers some interesting possibilities for developers in any field. We’ve put together a nice sample file that demonstrates one possible use case, but before diving into that, let’s cover the new features themselves.

Error Logging

Error trapping is a task that sooner or later becomes part of any development project. FileMaker Server has the ability to keep an error log, but devising a system that captures errors in a readily available (and useful) way has traditionally been on the shoulders of the developer. We at Skeleton Key have our own set of scripts and custom functions that are part of a standard template for any new development project. The downside of such a system is that it is incumbent on the developer to identify those script steps that could be prone to errors and to make sure the custom “Capture Error” scripts are inserted in just the right places in the parent script to accurately log those errors. Never mind the decision tree of possible actions that should be taken in reaction to any given specific error. A single new script step available in FileMaker 18 has made at least the former task much simpler.

By calling Set Error Logging [On] a script can initiate the creation of a ScriptErrors.log file directly in the user’s Documents folder. Once turned on, any script step that returns a non-zero error code will be recorded in the log. Each log entry will include the following information:

  • Timestamp
  • Database session number
  • Filename
  • Account name
  • Script name [script index]
  • Step name [line number]
  • Error code

In addition, a custom expression can be entered into the Set Error Logging step that will evaluate whenever an error gets logged. This can be used to capture any kind of custom info needed.

Data File Handling

Eleven new script steps have been introduced that annex a number of functions that, until now, have required either a plugin or use of the command line.

  • Open Data File – Opens a data file for use with other data file script steps.
  • Close Data File
  • Create Data File – Creates an empty, closed data file, to then open with the Open Data File script step and add data to using the Write to Data File script step.
  • Delete File
  • Read from Data File – Reads data from an open data file.
  • Write to Data File – Writes data to an open data file.
  • Get Data File Position – Returns the read-write position in an open data file.
  • Set Data File Position – Sets the read-write position in an open data file.
  • Rename File
  • Get File Exists – Returns 1 (true) if a file exists; otherwise, returns 0 (false).
  • Get File Size – Returns the size, in bytes, of a file.

Opening & Closing Data Files

To open a file, the script step requires 2 parameters. The file path (which uses the standard methods for FileMaker) and the name of a field or variable where the ID of the file will be held. Example: The following steps will open the file named “notes.txt” located in the user’s Documents folder and set the $FileID variable to the ID of the file. (Note: If the variable declared in the script step does not already exist, it will be created)

The same file could then be closed by calling the file ID.

Creating & Deleting Data Files

Files can be created by specifying the file path in the script step. Example: The following steps would create a new file named “results.txt” in the user’s Documents folder. (Note: In order to create the containing ‘test’ folder, if it does not exist, the option to create folders must be [On].)

Upon creation, new files are empty and closed. The Open Data File step would need to be used before writing to the file. The same file could be deleted by specifying the file path.

Reading & Writing to Data Files

The Read from Data File script step will read a specified amount of data from a specified (and opened) file starting at the current read-write position. (see Set/Get Data File Position steps). Example: The following will open the text file named ‘results.txt’ and read the first 250 bytes of data, setting the data read into the $$FileText variable.

Screen-Shot-2019-05-07-at-9.46.50-PM

The ‘Read as’ option will default to “Bytes”, but can be changed to either UTF-16 or UTF-8. If the ‘Amount’ option is left blank FileMaker will read in the entire data file. Data can also be written to a file using the Write to Data File step. Example: The following steps will open the file named ‘results.txt’ and write to it the data stored in the $$TextToWrite variable.

Screen-Shot-2019-05-07-at-9.51.17-PM

Data File Position

When a data file is first opened the default read/write position is 0. The current read/write position can be retreived by calling the Get Data File Position script step. This position can also be changed by using the Set Data File Position script step.

Screen-Shot-2019-05-07-at-10.00.19-PM

The above steps would set the read/write position of the opened file to the position of the 100th byte. (Note: The last available position of a file is equal to the file size.)

Demo File

The ErrorLogSample.fmp12 file uses a number of the new functions described above to demonstrate a basic version of an error log utility that could be implemented in any FileMaker solution.

Screen-Shot-2019-05-09-at-10.53.25-PM

To start, the file will run a script that has been created to be intentionally buggy. The ScriptErrors.log file that FileMaker creates when error logging is turned on can then be read into the file and displayed in a web viewer object. The error logging script steps take advantage of the ‘custom debug info’ option to include a small block of HTML as part of each error that gets logged. When displayed in a web viewer, this HTML makes it possible, using an FMP url with script and parameter tags, to navigate directly to the exact record that experienced the error. This ability would prove very useful as a debug tool as well as tracking down any records that may contain inaccurate data as a result of a scripting error.

In addition, once read into the file, the error log can be exported to the desktop as a file that includes, as part of its header, the text that is entered into the field provided. An implementation of this type could easily be followed up by additional scripts that sent the resulting file as an email attachment. Using something similar to this demo, users could send error logs to a developer or admin with a click of a button complete with any additional information needed from the user such as what actions they were performing when the error occurred.

Jeremy Upton is a FileMaker Certified developer at Skeleton Key.

About Skeleton Key

Skeleton Key develops apps on the FileMaker platform making them easy-to-integrate, easy-to-use, and quick to build and deploy. Our team of experts takes a comprehensive consulting approach to focus on learning how your organization operates. With deeper insights into the way your team works, we’re able to create an ideal solution built around your operations while forming a partnership founded on trust and transparency. We hope you found this content useful and we would love to hear from you if we can be of any further assistance.

Depositphotos 72837097 l 2015

FileMaker 18: The While Function (looping in calculations)

FileMaker 18  introduces a new function that developers have long anticipated. The While function gives developers the ability to create looping calculations. Although Custom Functions (introduced in version 7) have given us a form of looping via recursion, the While function simplifies the looping process as well as brings that functionality into the calculation engine which makes it a vastly more powerful tool.

In this article, we will explore the While function, its parameters, and some examples.

How it Works

A “While” loop functions by repeating the logic (i.e. looping) as long as the condition is true or to say that another way “while” the condition is true.

There are four parameters for the While function:

  1. Initial Variable
  2. Condition
  3. Logic
  4. Result

To write it out as it will appear in the calculation engine:

While ( [ initialVariable ] ; condition ; [ logic ] ; result )

Let’s start with an example and then we’ll dig into the pieces.

An example

One of the first simple recursive functions that I saw, called itself in order to loop over some text and make a multi-line key. It would take some text like “FileMaker” and the output would be a text block like this:

F
Fi
Fil
File
FileM
FileMa
FileMak
FileMake
FileMaker

If I use that as an example, creating a While function to produce that kind of output looks like this:

While ( 
[ 
  theText = "FileMaker"; 
  textLength = Length( theText ); 
  theResult = ""; 
  counter = 0 
] ;

counter < textLength ; 

[ 
  counter = counter + 1 ;
  theResult = theResult & Left( theText ; counter ) & "¶"
] ; 

theResult

)

Breaking it apart

Ok, so let’s zoom in on each section of the function and discuss what is happening.

Initial Variable

The initial variable parameter is where you establish one or more variables that will be available to use by the other parameters. This is where you will define the variables that will be needed later in the function.

While ( 
[ 
  theText = "FileMaker"; 
  textLength = Length( theText ); 
  theResult = ""; 
  counter = 0 
] ;

The first two variables make sense as they are establishing the text we will be looping over and the information we need to exit the loop.

  • theText: The text we are going to loop over
  • textLength: provides an exit condition for our loop

The second two variables can be slightly confusing as they don’t seem to be needed until later. The reason they are here is because the variables need to be initialized (i.e. established) if we want them to retain their value throughout the entire looping process. If we don’t include those variables in this section then we can’t add to the counter and we can’t build up a list in theResult. 

  • theResult: Has to be initialized here so it can be used later
  • counter: Has to be initialized here so it can be used later

Condition

The condition parameter is a test. It is a Boolean expression that is evaluated before each loop iteration. As long as the condition is true…or while the condition is true, the loop repeats. When false, the loop stops (and jumps to the result).

counter < textLength ;

In our example, the loop will continue as long as the counter is less than the textLength.

Logic

The logic parameter is the section that gets evaluated each time the loop is repeated. Variables that are established here will be “reset” or rather “reevaluated” for each loop.

[
counter = counter + 1 ;
theResult = theResult & Left( theText ; counter ) & "¶"
] ;

In our example, the counter variable is incremented by 1 and theResult uses the Left function to build a simple list.

Result

The result parameter is an expression that is returned when the loop stops. Just as the name implies, this is where the result of the function (i.e. the result of your calculation) will go.

theResult

)

In our example we placed our array into theResult variable, so now all we need to do is have our calculation return its contents.

Variable clarification

There are two places in the While function where you can set function variables (Initial Variable and Logic). The initial variable will be available throughout the looping process, while the variables set in the Logic section will be evaluated each time the loop is repeated.

One way to think about it is kind of like a script variable and global variables ($var & $$var). In the same way that global variables ($$var) survive outside of the currently running script, variables created in the Initial Variable parameter survive outside of each individual iteration of the loop that is happening inside the While function. Also, in the same way that script variables ($var) do not survive outside of the currently running script, variables created in the Logic parameter do not survive outside of the current iteration of the loop.

Variable Scope

In the FileMaker 18 Help documents, there is an example (shown below) that includes a While function within a Let function.  Since calculation variables can be created in both of these functions, the scope of each calculation’s variable can get confusing. To put it simply, a function’s variables are available from any place within that function. Let’s look at the example and then dissect it. I’ll number each line so it is easier to refer to.

1 Let (
2   City = "Paris";
3   While(
4     [ City = "San Francisco"; i = 0 ] ;
5     i < 5 ;
6     [
7      i = i + 1 ;
8      City = City & "."
9     ] ;
10    City
11  )
& City )

So, the “City” variable in the Let function above is available to the Let function at any place contained within the Let function (i.e. inside the While function). The “City” variable in the While function is available to the While function, but not to the Let function.

In the real world, I’d probably try to avoid having the same variable name in both places, but it is an interesting example to copy out to data viewer and play with to see how things work. For example, the current result to this calculation is “San Francisco…..Paris”, but if you change:

  1. Line 4 to [ City = City; i = 0 ] ; the result is “Paris…..Paris”.
    • The While’s city variable is getting set to Paris. The While function can see the Let’s variables because While is inside the Let function.
  2. Line 8 to Town = City & "." and line 10 to Town the result is San Francisco.Paris.
    • Town isn’t initialized on line 4, so it gets reset on each loop. It doesn’t build on itself but rather gets reset to “San Francisco.” each loop iteration.
    • You could almost think of this as putting the cursor in a field 5 times and typing “San Francisco.” each time, but the field is set to “Select entire contents on entry”…at the end of that activity you’d just have “San Francisco.” once in the field because you’d be overwriting it each time.

Variable scopes behave the same no matter how the nesting occurs. If you have a While function and inside one of the parameters you decide to include a Let function, then the Let’s variables will only be available to the Let function, but the While’s variables will be available to both the While function and the Let function.

Can I get stuck in a loop?

We’ve all done it. Whenever a developer has the power to build a looping process, we inevitably eventually end up in an infinite loop situation. The While function will return a “?” when the number of iterations exceeds a limit. What is the limit (I knew you were going to ask that)?

FileMaker 18 gives us another new function so we can control that limit. SetRecursion ( expression ; maxIterations ) allows you to specify the max number of iterations to allow. This function is pretty straight forward. By default, the While function maxIteration limit is set to 50,000. To use the SetRecursion function you would place the While function as the “expression” parameter and the set the “maxIterations” parameter to the number you want.

You can also use the SetRecursion function to control how many times a custom function that uses “non-tail” recursion will iterate. To be clear, you don’t add the SetRecursion function to the Custom Function’s definition, but rather when calling the Custom Function, you wrap it inside the SetRecursion function to control how many iterations to process before returning a “?”.

Shoot me an email if you’d like to discuss the new While function. It is a powerful new tool that will help developers work faster and create complex processes more efficiently than ever before.

Chad Adams is a FileMaker Certified Developer at Skeleton Key in St. Louis, MO.

About Skeleton Key

Skeleton Key develops apps on the FileMaker platform making them easy-to-integrate, easy-to-use, and quick to build and deploy. Our team of experts takes a comprehensive consulting approach to focus on learning how your organization operates. With deeper insights into the way your team works, we’re able to create an ideal solution built around your operations while forming a partnership founded on trust and transparency. We hope you found this content useful and we would love to hear from you if we can be of any further assistance.

Depositphotos 6608652 l 2015

FileMaker 18: Improved Data Importing

The FileMaker Pro 18 Advanced import dialog provides a clearer, more intuitive workflow that will make data importing more accurate and efficient. The Import Dialog interface has had virtually the same interface and functionality since version 7. This article shows many animated screenshots from FileMaker Pro 18 Advanced to introduce the interface and behavioral changes.

User Interface Improvements

The images below speak for themselves. FileMaker Pro 18 Advanced’s import interface clearly has more visual appeal than previous versions. The ingredients of the new interface are the use of space, color, and the placement of tools.

Import_Updated-User-Interface-FM18v17

Updated user interface in version 18

Use as Field Names selector

Say goodbye to the Don’t import first record (contains field names) checkbox because it was removed from the interface. The only option offered in previous versions was the option to ignore the first row of the source file (the source file contains the data to be imported). The first row was assumed to contain field names. The row selector feature has been improved in version 18 now that developers specify the Field Names row. All rows that precede this designation will be excluded and those that follow are considered data rows. FileMaker, Inc. should still address the issue that while the data might start on a row other than 1 or 2, there might not be a row representing field names.

Import-Set-first-record-FM18

Improved data row selector

Field delimiter options

Say hello to FileMaker Pro 18 Advanced’s custom delimiters. This feature drastically simplifies the delimiter-handling process. A fixed list of delimiter types in version 17 and earlier sometimes limited developers. This often presented a post-import process to handle special delimiters. When the data source’s delimiter isn’t Tab, Comma, Semicolon, or Space, enter a custom delimiter in the field titled Other.

Import-custom-delimiter-FM18

The | (pipe) character as a custom delimiter

Type-ahead search box

FileMaker Pro 18 Advanced leverages a type-ahead search box to find fields in the import interface. Tables that contain a long list of fields are more manageable. In contrast to other versions, target fields can easily be found. There is no need to scroll through long lists of fields.

Import-field-type-ahead-FM18

Animated GIF: Using the type-ahead search box to find a target field

Field-level Auto-entry On/Off Controls

At times, a developer needs to import data from a source and wants some (not all) auto-enter options to be triggered. Examples include serial numbers, creation/modification timestamps, and creation/modification account names. FileMaker Pro 18 Advanced has the ability to turn on and off auto-enter options for individual fields. This flag determines whether field data should or shouldn’t be incremented or modified during import. So now, for example, serial numbers can be incremented while timestamp and account names are retained. Allow all or allow none were the only auto-enter options in previous versions.

Import-auto-entry-options-FM18

FileMaker Pro Advanced 18 auto-entry options

Other Features

While noteworthy, these two items may not be apparent at first.

Batch Field Selection/Action

Developers can now select all or select multiple fields in order to batch change the import behavior to and from Import or Don’t import this field. This feature will save a lot of time and frustration. Tip: Click on the source or target’s field name column first, then use the operating system’s select all command.

Import-select-all-fields-FM18

Select all fields and change action: Cmd + a (macOS) or Ctrl+a (Windows)

Relocation of Add/Update/Replace

The Add/Update/Replace options are located in the screen’s top-center between the words Source and Target. The three options Add, Update, or Replace appear in a visually appealing and informative pop-over when the blue word and arrow are clicked. On a side note, this doesn’t follow FileMaker design patterns. The use of color more clearly indicates the different actions, on a field-by-field basis. Note how the blue-colored highlight and the words Match Field stand out when the Update action and the match field have been selected.

Import-action-popover-FM18

Action popover for Add, Update and Replace. Match field too!

 

Jay Sayers is a FileMaker Certified Developer at Skeleton Key in St. Louis, MO.

About Skeleton Key

Skeleton Key develops apps on the FileMaker platform making them easy-to-integrate, easy-to-use, and quick to build and deploy. Our team of experts takes a comprehensive consulting approach to focus on learning how your organization operates. With deeper insights into the way your team works, we’re able to create an ideal solution built around your operations while forming a partnership founded on trust and transparency. We hope you found this content useful and we would love to hear from you if we can be of any further assistance.

Depositphotos 56062629 l 2015

FileMaker 18: Assisted Install – read this BEFORE you install FileMaker 18

Did you just finish installing FileMaker 18 on all the machines in your workgroup? If so, you’re reading this too late, come back and read it again before you install FileMaker 19 next year.
If you haven’t installed the new version yet and you are not looking forward to how long it will take you to do so, you are in the right place.

When you’re setting up FileMaker Pro Advanced on one or two machines, you probably don’t give much thought to how long it takes to enter your license information and run the installer, but you don’t have to do this very many times before it becomes tedious and deploying a new version to even a moderate-sized workgroup can become a huge time suck. For this reason, FileMaker provides installation options that allow you to automatically provide your license information to the installer so that it doesn’t need to be manually entered on each user’s machine. This same feature also gives you additional options that aren’t available when running the installer normally. With a new version of FileMaker just released, now is the time to learn how to use the assisted install so you can spend all of those hours you told your boss it would take to install FileMaker doing something else.

Picking an installation method

There are several methods that you can use to streamline your installation process. Which one you pick will be determined by your OS and your company’s IT policy. Covering the full range of installation methods in depth is beyond the scope of this blog post, but I will do my best to give you an overview of the methods for each platform and cover the methods that I’ve used more thoroughly.
Before I launch into an explanation of these methods I want to point out that most of these require you to save your FileMaker license information where the installer can find it, which means that it is also available to any user who can access the installer. Take appropriate precautions to make sure your license information cannot be easily stolen.
While both the Windows and macOS installers can make use of a file named Assisted Install.txt don’t be fooled into thinking that they are the same. Each platform has its own version of this file and they are not interchangeable.
Also, it goes without saying that you must have admin-level access to install FileMaker Pro Advanced on any workstation.

Windows installation methods

  • Installing using a networked volume (Recommended)
  • Installing from the command line with msiexec
  • Silent assisted installation
  • Saving the license key in the .msi installer

Installing using a networked volume (Recommended)

This method stores the installation options in a plain-text file named Assisted Install.txt that resides in the Files folder inside the unzipped Windows installer folder. The customized installer folder is then placed on a volume where it can be accessed by the workstations where you need to install FileMaker Pro Advanced. Please note: while FileMaker documentation refers to this as a “networked volume” install, this can also be run from removable media.
See the section below that details the contents of the Assisted Install file for more information on the options available here.
Pros: Fairly easy to set up. FileMaker provides you with an Assisted Install template file that you fill in. Provides the most installation options of any method.
Cons: License information is stored in plain text so anyone with access to the installer can copy it if they know where to look. Still requires some input from the user to install.

Installing from the command line with msiexec

Using the command prompt run as an administrator you can enter the license information at the command line. It’s also possible to write a batch file that calls this for you.
Pros/Cons: Honestly, I’m not sure on this one. It doesn’t seem like less work than entering the license info as you run the installer. If you use a batch file to automate it then it becomes no more secure than the assisted install file. I’m sure there are certain IT environments where this works best, but I don’t know what they are. Also, it’s unclear from the documentation whether you can enter all of the assisted install options from the command line or if it’s limited to the licensing information.

Setting up silent assisted installations

After setting up the options in the Assistant Install.txt file as described in the Installing using a networked volume option above, you can then open the command prompt as an administrator and call the setup.exe file with additional arguments that will cause it to run with little or no interaction from the user. This is my preferred option on Windows.
The full list of available arguments is available from the FileMaker documentation referenced earlier in this article. I use the following command which shows an installation progress bar with a cancel button but otherwise requires no user input.

"pathname\setup.exe" /qn+

Pros: Requires the least user interaction from the installer.
Cons: Requires a user to interact with the command line.

Saving the license key in the .msi installer

Using the Microsoft Orca editor you can edit the .msi installer file to directly embed the license key and personalization information. This eliminates the need for the Assisted Install.txt file.
Pros: This is the most secure option for your license information since it is no longer stored in a plain-text file.
Cons: While you can store licensing information in the .msi installer you can’t include any of the other information from the assisted install file so some user interaction is still required.

macOS installation methods

  • Installing using a networked volume (Recommended)
  • Silent assisted installation using Apple Remote Desktop

Installing using a networked volume (Recommended)

This method stores the installation options in a plain-text file named Assisted Install.txt that resides in the root of the disk image containing the FileMaker Pro Advanced installer for Mac OS. You will then create a new disk image where you copy the installer, the License Agreements folder and the modified Assisted Install.txt file.
Please note: while FileMaker documentation refers to this as a “networked volume” install this can also be run from removable media.
Unlike the Windows version, you can not specify which language version is installed. If you need to change the language version go the to System Preferences and change your default language before running the installer, then change it back after installation completes.
Pros: Fairly easy to set up. FileMaker provides an Assisted Install template file that you just need to fill in. Provides the most installation options.
Cons: License information is stored in plain text so anyone with access to the installer can copy it if they know where to look. Still requires some input from the user to install.
See the section below that details the contents of the Assisted Install file for more information.

Silent assisted installation using Apple Remote Desktop

Similar to Installing using a networked volume, but after editing the Assisted Install.txt file you also create personalized remote desktop install script that you can then use to install FileMaker Pro Advanced silently on workstations under your control.
Pros: Provides a silent install with no interaction from the user needed.
Cons: License information is stored in plain text so anyone with access to the installer can copy it if they know where to look. Requires Apple Remote Desktop which is an additional cost.

Options in the Assisted Install file

Most of the installation methods above rely on the Assisted Install.txt configuration file to tell them what options they should use during installation. The most commonly used options allow the installer to automatically provide the user’s license information and suppress the installation dialogs that require user input, but there are also options that allow you to control some of the features available in FileMaker Pro Advanced after installation. The full list of installation options includes the ability to:

  • Accept the End User License Agreement (EULA)
  • Enter a user name for all installations
  • Enter a company name for all installations
  • Enter a valid license key for all installations
  • Specify the language version of FileMaker Pro Advanced (Windows only)
  • Specify whether FileMaker Pro Advanced is available to all users or to the current user only (Windows only)
  • Create a shortcut for FileMaker Pro Advanced on the desktop and in the Quick Launch toolbar (Windows only)
  • Suppress the Personalization dialog box during installation
  • Disable the Software Update dialog box
  • Disable the New Version Notification dialog box
  • Disable option for plug-ins to be installed by solution files
  • Hide the Enable ODBC/JDBC command
  • Hide the Configure for FileMaker WebDirect command
  • Disable the FileMaker Pro Advanced development tools
  • Specify a custom app to open when FileMaker Pro Advanced starts (New in FileMaker 18)

For full details of the installation options available in the Assisted Install file click here:

Network Install Setup Guide – Personalization options

FileMaker Server assisted install

It should be noted that there is also an assisted install option for FileMaker Server. Having to deploy large numbers of FileMaker Servers is not as common as deploying large numbers of FileMaker Pro Advanced, but if it is potentially useful. Please note that you will still need to run the FileMaker Server Admin Console to configure most options. The assisted install does provide the ability to automate the following installer choices for FileMaker Server 17 and later:

  • Organization – Your organization name as it appears on your license
  • Deployment Options – Single machine deployment vs WebDirect worker machine
  • FileMaker Server User
  • Admin Console User
  • Admin Console Password
  • Admin Console PIN
  • Launch Deployment Assistant
  • License Certificate Path
  • SkipDialog – Choose whether or not you want the installer to suppress dialogs as the installer runs

For a full rundown of the FileMaker Server assisted install process click here:
Assisted install of FileMaker Server 17 and later
While the assisted install process is often overlooked for smaller installations the time spent mastering this tool can quickly pay for itself. With new versions being released on an annual basis, it’s a good investment in productivity.

Alan Kirtlink is a FileMaker Certified Developer at Skeleton Key in St. Louis, MO.

About Skeleton Key

Skeleton Key develops apps on the FileMaker platform making them easy-to-integrate, easy-to-use, and quick to build and deploy. Our team of experts takes a comprehensive consulting approach to focus on learning how your organization operates. With deeper insights into the way your team works, we’re able to create an ideal solution built around your operations while forming a partnership founded on trust and transparency. We hope you found this content useful and we would love to hear from you if we can be of any further assistance.

Data API Integration

FileMaker 18: FileMaker Data API New Features

FileMaker 18 is finally out and with it comes new features and improvements to the FileMaker Data API. A new category of API calls has been added to allow developers to request metadata from a FileMaker host. These new API calls return information regarding:

  • Product Information
  • Database Names
  • Layout Names
  • Script Names
  • Layout Metadata

Two additional API calls have also been added:

  • Duplicate Record
  • Execute Script

These new additions expand the ways that we can work with FileMaker solutions via the FileMaker Data API. Throughout this article, we will dig deeper into what these new API calls mean and how can they be used.

 

Quick Note

If you are a beginner at using the FileMaker Data API, I suggest that you visit the FileMaker help section to learn more. This guide provides an overview of what the new features are to the FileMaker Data API. It will not discuss details of API calls that were introduced in previous versions of FileMaker Server.

During this walkthrough, I will be using screenshots from a personal solution to demonstrate the requirements and results of each API call. You should be able to view the API call URL and its parameters on the left side of the screenshot and its results on the right side. The database that I am using to connect with is a Tasks starter solution that FileMaker provides when creating a new solution. Now that this has been explained, let’s dive into the new FileMaker Data API features.

 

Product Info

The Product Information API call allows us to extract metadata from FileMaker Server or FileMaker Cloud for AWS. It is one of the simplest calls to make. The only data that is required to create the API URL is the FileMaker Data API version number.

 

Screen-Shot-2019-05-22-at-10.28.46-AM

Once the call has been made and it has been successful, you should see call results similar to what is seen in my example on the right side. The server provides some general information on itself including when the server was built, what the version number of the server is and some date and time format information.

 

Database Names

The Database Names API call request provides a list of the databases that are hosted on FileMaker Server. As we have seen in the previous API call, the API version number is the only requirement when creating the call URL. However, you have the option to pass in header parameters such as an Authorization Token to view databases based on account credentials if the FileMaker Server has “Filter Databases in Client Applications” enabled. Otherwise, if it is disabled, then you should see all hosted databases with the following criteria:

  • Databases open or paused on the server.
  • Databases that have an account with the extended privilege fmrest enabled.

Database-Names

Above is a screenshot that displays the data that is returned after this call has been made. It should return the hosted database names in a JSON Object which will reside in a JSON List. A question you might be wondering is what kind of interaction might occur if these databases resided in a subfolder. Would data be returned to indicate whether a database resided in a subfolder or not? Well, no. It would still return a list of databases as you see in the screenshot and would disregard folder structures. However, we will not see the same interaction from the other metadata API calls.

 

Layout Names

Now, let’s dive into the Layout Names API call request. This request allows a developer to extract a list of layouts residing in a database that you have an ongoing session with. This means that you will need to log in to the database via the FileMaker Data API and obtain a session token. With this session token, you will be able to meet the authorization requirements for this call. You will also need to define the database name in the API URL.

Layout-Names

From the screenshot above, we can see that the result includes information about the layouts and layout folders for the database. For folders, the JSON object will include an “isFolder” key with a true value and a “name” key with the name of the folder. The folder object will include an array of layout name objects.

 

Script Names

The Script Names API call request is very similar to the Layout Names API call request. Instead of receiving a list of the layout names, what we will be receiving is a list of the script names that a connected database holds. This call accepts the same parameters as the Layout Names call request. One difference regarding the data received is that all JSON objects include an “isFolder” key that will be true for folders and false for scripts.

Script-Names

Layout Metadata

The final new metadata request returns detailed information about all of the objects on a layout. To make this request, you will need to specify the database you want to connect to and the layout that you want to retrieve information about as parameters. We will also need a session token for that database as well. Once the request is made, the returned result will be a JSON object with information about fields, portals, and value lists.

Layout-Metadata

From the above image, you can see what kind of data is returned. For the field metadata section of the JSON object, we can see it displays attributes of the fields that reside on the layout that are not contained in portals. Each portal will be included as an object containing an array of the fields contained within the portal. For value list metadata, the result includes the name of the value list, whether the value list is a custom one or one that is based on a field, and an array of values for a custom value lists.

This API call also has an optional query parameter that allows the developer to specify a record ID to retrieve value list data based on that record. This will allow us to see value list information that is based on related data. With the information gathered from a specific record, a user might be able to re-create related value lists based on fields in other interfaces.

Overall, this call is useful to extract information for other calls. This information could be a guide on what data we should expect to retrieve when enacting any of the record GET calls. For example, if I were to use the GET Record call, I would be able to expect what data would be returned based on what is on the layout. I also could expect on a length of call depending on how many calculations, summaries or portals could be on the layout. Most of the record GET calls also have a query parameter regarding portals which we would be able to use this call to retrieve some of the portal table names need to pass into other calls.

 

Duplicate Record

Another addition to the FileMaker Data API is the ability to duplicate an existing record. You will need to specify the database name, layout name, and the record ID for the record you wish to duplicate. As with other Records API calls, a session token is required and options are available to run a script at various points during the request.

Duplicate-Record

Once the request is complete, it should return the record ID for the newly created record. It should also return a record modification count value, which is the modId key in the screenshot. The modID always starts at 0 for a new record and is incremented each time the record is modified.

 

Execute Script

Finally, FileMaker has added an Execute Script API call. This will allow developers to execute scripts independently of other API calls. In previous versions of the FileMaker Data API, scripts could be executed, but only as part of other API calls, such as create, edit, delete and find. Now, we have the ability to perform scripts without tying the request to a possibly unnecessary action.

Execute-Script

This API call requires multiple parameters to initiate the call. You will need to specify the database name, the layout name and, of course, the script name. You also have the option to pass a script parameter as a query parameter. For my example, I run a script on the hosted Tasks database to create a new task record. Once the script has ended, the ID of the newly created record is returned as a script result. You can see the script result in the response portion of the API call results above.

Take caution though. Scripts run via the API must establish their own context and should include appropriate error handling logic.

Execute-Script-Script-Example-Part-1

The above screenshot displays the script that I had previously called via the execute script API call. I made a modification where I am performing a find with a garbage value so an error would occur. I also changed the script result with a local variable that I declare before the find. The result I receive is seen below.

Script-Error-Part-1

We can see that we retrieve a script error of 401 which was expected. We continue to receive the script result as well. Now let’s change the script to perform another operation after the error is thrown.

Execute-Script-Script-Example-Part-2

I have now re-set the local variable with the same value. After making the same API call, this is what I receive.

Script-Error-Part-2

The script error is cleared and the script result still returns with the correct value. What you will need to remember from this is that proper error handling will need to be introduced to understand whether an error has occurred once the script has run and then properly handle the outcome. Otherwise, data may not be properly modified or returned.

Conclusion

It’s truly exciting to think about the possibilities of what could be done with these new features. One idea that came to mind was to combine the Script Names API call with the Execute Script API call. A developer could dynamically extract the list of scripts from a database and then provide an interface for users to execute any of those scripts. The following image shows a simple example of this idea.

Script-List

Developers could also implement a way to track changes to layouts by comparing Layout Metadata API call results from different days. It would be interesting to see what had changed during development from one day to the next. The possibilities are endless. Let me know in the comments how you intend to use these new FileMaker Data API calls.

Jessie Cisneros is a FileMaker Certified Developer at Skeleton Key in St. Louis, MO.

About Skeleton Key

Skeleton Key develops apps on the FileMaker platform making them easy-to-integrate, easy-to-use, and quick to build and deploy. Our team of experts takes a comprehensive consulting approach to focus on learning how your organization operates. With deeper insights into the way your team works, we’re able to create an ideal solution built around your operations while forming a partnership founded on trust and transparency. We hope you found this content useful and we would love to hear from you if we can be of any further assistance.

Depositphotos 12678764 l 2015

FileMaker 18: New Supported Barcodes

Since FileMaker Go 13 introduced support for scanning barcodes with the camera of an iOS device, it has been a widely used feature across many different business niches. Barcodes are an excellent way to improve efficiency and eliminate error in human data entry in a vast array of industries. The support for barcode scanning allows FileMaker users to streamline processes like managing inventory, pricing, or shipment tracking. Many other uses of barcodes are popping up all around us, allowing users quick access to additional information using only their smartphone. Advertising, Transport, Technology, Education, Food Industry, Gaming, and even the Diet Industry are just a few examples of the many industries that are benefiting by the ever-growing use of barcodes in their workflow.

New Barcode Types Supported in FileMaker Go 18

We are excited that with FileMaker 18, there is now support for even more barcode types then there was before.  The Insert from Device script step now supports four new barcodes, each with unique advantages and real-world applications.

  • PDF417
  • ITF-14
  • Aztec
  • Data Matrix

PDF417 Barcode

pdf417

The PDF417 Barcode is a multi-row, variable-length symbology with high data capacity and error-correction capability. PDF417 is widely used as postage accepted by the United States Postal Service, the airline industry’s Bar Coded Boarding Pass (BCBP) standard  2D barcode for paper boarding passes, and is also the standard selected by the Department of Homeland Security as the machine-readable zone technology for Drivers Licenses and state-issued identification cards.

PDF417 allows user selection of its security level, although a higher error correction level increases the size of the barcode. Higher error correction can be more resilient to concerns regarding damage in transport or printing errors, but in most situations the default algorithm is sufficient.

 

ITF-14 Barcode

itf14

ITF-14 is the GS1 implementation of an Interleaved 2 of 5 (ITF) bar code that is used to encode a Global Trade Item Number. ITF is the acronym for Interleaved 2 of 5 and 14 stands for the number of digits used. ITF-14 symbols are generally used on packaging levels of a product such as cartons, cases, or palettes.

ITF-14 does not have the capability to change its levels of security, which is not usually necessary for this type of barcode. It is most commonly used by manufacturers and distributors. The 14 digits of the barcode usually contain the product’s 12 digit UPC along with some additional data such as a signifier for the amount of the product that a carton contains.

 

Aztec Barcode

aztec encoding

The Aztec Barcode was named after the Central Finder Pattern of the Aztec Pyramids. It has the ability to fit data into a smaller area because it does not require the blank “quiet zone” that many other barcodes require. The data in this barcode is encoded in concentric square rings around a bulls-eye pattern.

The Aztec Barcode is widely used in transportation. Airlines and Railways send Aztec Codes to passengers’ phones and mobile devices to act as boarding passes, which can also be integrated with apps on passengers’ phones, like Apple Wallet.

 

Data Matrix

datamatrix

The data matrix barcode is a two-dimensional barcode that can encode numeric or text data into square or rectangular modules. With Data Matix barcodes, you can increase readability by adding error correction codes. The biggest selling point is their ability to hold a large amount of data in a very small area. A data matrix barcode can encode fifty characters in a 2 or 3 mm area.

Data Matrix codes can be marked directly onto an item to tie that item with its intended data for life. The codes can be marked onto components using various methods, but within the aerospace industry, these are commonly ink-jet, dot-peen marking, laser marking, and electrolytic chemical etching (ECE).

 

FileMaker Implementation

Bar Code Options

In order to implement functionality for these new barcode types in your FileMaker database, you will use the Insert from Device script step. Then you will select Scan from Camera and select the barcode type you would like to scan.  If you are using an iOS device, these barcodes are now natively supported in iOS 12 via the camera app. If you are not using an iOS device, FileMaker also supports the use of third-party scanners.

 

Monica Blum is a FileMaker Certified Developer at Skeleton Key in St. Louis, MO.

About Skeleton Key

Skeleton Key develops apps on the FileMaker platform making them easy-to-integrate, easy-to-use, and quick to build and deploy. Our team of experts takes a comprehensive consulting approach to focus on learning how your organization operates. With deeper insights into the way your team works, we’re able to create an ideal solution built around your operations while forming a partnership founded on trust and transparency. We hope you found this content useful and we would love to hear from you if we can be of any further assistance.