JSON, Level: Any, Version: FM 18 or later

JSONQuery 2.0 is Here

This is a quick post to say that JSONQuery 2.0 is finally here with many new features, and some improvements to existing features as well.

What is JSONQuery?

A FileMaker custom function authored by Steve Senft-Herrera that enables you to query JSON (works with FM 18+).

Basic Things JSONQuery Does

1) Query – Allows for finding elements that match a supplied value, with a variety of options for operators.

2) Aggregate – Allows for returning an aggregate, e.g., SUM, AVG, LIST, etc., of values taken from either the matched elements, or all of the input.

3) Transform – Allows for customization of how the results are returned, with the option to pick-and-choose what attributes are included in the output, and how they are named.

Official Site

https://github.com/steve-ssh/FMP_JSONQuery

Continue reading “JSONQuery 2.0 is Here”

JSON, Level: Advanced, Version: FM 16 or later

Fast Summaries to JSON, part 2

This is a follow up to last week’s Fast Summaries to JSON and will assume the reader is familiar with that material.

Demo Files

After last week’s article appeared, a reader contacted me wondering whether the technique could be adapted to provide a more literal JSON representation of what was visible on-screen. The answer turns out to be yes, with a bit of additional work…

Continue reading “Fast Summaries to JSON, part 2”

JSON, Level: Advanced, Version: FM 16 or later

Fast Summaries to JSON

The other day some colleagues were discussing a need to produce a JSON representation of the data in a summary report. Long time readers of this blog will know that I am obsessed with fond of the Fast Summary technique, and it seemed like it might be a good fit for this challenge, so I built some demos to find out if that would be the case.

Demos 1 and 4 will work with FM 16 or later. Demos 2 & 3 utilize recently-added JSON features, so require FM 21 or later.

Continue reading “Fast Summaries to JSON”

ExecuteSQL, JSON, Level: Advanced, SQL, Summary List, Version: FM 20.2 or later

OnWindowTransaction JSON

Demo file:  on-window-transaction-json-v2.zip
Credentials:  admin / admin
Minimum version:  20.2  [for both client and server]

Note: This demo file is optimized for Perform Script on Server (PSOS), and is intended to be hosted on FileMaker Server or FileMaker Cloud.

Introduction

Recently a colleague mentioned that they were running into a performance issue trying to load a complex found set (customers, invoices and line items) as an array of objects into a $$variable. It was simply taking too long across a WAN connection, and contributing factors included unstored calculations referencing related unstored calculations, and the rendering taking place client side as opposed to server side.

We’ve explored rendering a found set as JSON here previously…

…but both of the above involve constructing the JSON on the fly at runtime. My colleague was hoping for something faster, and today we’re going to look at a fresh approach. Continue reading “OnWindowTransaction JSON”

JSON, Level: Advanced, Level: Intermediate, Version: FM 16 or later

FastRange Custom Function

Recently I needed to produce a large range of consecutive numbers. FileMaker doesn’t provide a built-in function for this but it’s easy enough to accomplish, for example, using the While function or a recursive custom function. In this case, I decided to go a different route based on a tip I’d seen someone post years ago (I’ve forgotten whom so cannot give proper credit) that you can leverage a couple of FileMaker’s JSON functions to facilitate this task, with the advantages being blazingly fast performance and an opportunity to think outside the box.

Demo file:  fastrange-cf-v1.04.zip
Continue reading “FastRange Custom Function”

Level: Intermediate

Replace + GetNthRecord to Fill Down

This afternoon I pulled this data into FileMaker from a spreadsheet, and needed to “fill down” the region names in f2.

Of course I could have filled the region down in Excel prior to importing, but here I was already in FM. At first I was going to use a looping script, but then it occurred to me that it would be nice if Replace could do the trick. Continue reading “Replace + GetNthRecord to Fill Down”

Level: Intermediate, Version: FM 20.3 or later

January 2024 FM-DiSC Presentation

Here are resources re: my January 12th FM-DiSC presentation.

Layout Calculations

Generating Spreadsheets with LibXL

YouTube recording of meeting

Level: Intermediate, Version: FM 20.3 or later

Layout Calculations in FileMaker 20.3

Update 12 Dec 2023: this article has been updated as per my exchanges with Fabrice Nordmann in the comments section below. Thank you Fabrice for the reality check.

This is a follow up to last month’s article, Layout Calculations in FileMaker 20.2, and will assume the reader is familiar with that material. Today we will be taking a look at some changes to Layout Calculation behavior in the newly-released FileMaker 20.3.

#1. Calculation Result Type Can Now Be Specified

We can now specify the result type for a layout calculation…

…whereas in FM 20.2, the result type could only be text.

Initially I was under the impression that this would yield benefits when applying, for example, date specific formatting options, but as Fabrice points out, the formatting behavior is identical regardless of what you do with the result type. Continue reading “Layout Calculations in FileMaker 20.3”

Level: Intermediate, Version: FM 20.2 or later

Layout Calculations in FileMaker 20.2

The recent release of FileMaker 20.2 introduces a feature that developers have long been asking for: the ability to define calculations at the layout level without resorting to workarounds (such as those we saw in Button Bar Segment Fun, part 1 and part 2.)

You can read the official word(s) from Claris here…

…and today I just want to share a few observations. First, in case you haven’t yet gotten your feet wet with layout calculations:

  1. Make sure you’re using FileMaker Pro 20.2 or later
  2. Go into layout mode
  3. Choose “Layout Calculation…” from the Insert menu
  4. The Specify Calculation dialog will appear
  5. Enter the syntax for your calculation, e.g.,
    "Hello " & Get ( UserName )
  6. Click OK

You’ll see something like this in layout mode…

…and this in browse mode (if your user name happens to be Kevin).

Okay… let’s go back into layout mode for some experimentation. If you control-click on the layout calc block you can access the Specify Calculation dialog…

…but, if you prefer, you can also edit the layout calc directly on the layout.

Continue reading “Layout Calculations in FileMaker 20.2”

JSON, Level: Intermediate, Version: FM 18 or later, Virtual List

JSON Currency Exchange Rates, v3

Demo file: json-currencyapi.com.v2.zip

This is a quick follow up to a pair of articles I published earlier this year, and will assume the reader is familiar with that material.

Having first blogged about this back in 2020, I had hoped to be finished with this topic, not because it isn’t interesting (it is) or because getting comfortable working with APIs isn’t fun, educational, and potentially profitable (ditto), but because I didn’t really have much left to say on the subject. Unfortunately, for the third or fourth time now, the API my demo was based on stopped working after the service provider was purchased by another company with the aim of monetizing the formerly-free service. Continue reading “JSON Currency Exchange Rates, v3”