Posts

FileMaker Data API and Portal Filters

We’re currently working on a project where we are exposing the FileMaker Data API to some web technologies. The team working on the Web side of things have asked for the portal data passed back by the Data API to be filtered between a date range.

To do this with a relationship would mean having the current date in every parent record and we’d need to update this daily. Not the smartest way but it would work.

However we wondered if portal filters would work and sure enough the JSON passed back by the Data API was filtered based on the portal filter we placed on the layout.

tldr; You can use portal filters on a FileMaker layout and this will translate over to the FileMaker Data API response.

We also discovered that if you give your portal an object name, this too will be reflected in the Data API response object

{
 "response": {
  "data": [
   {
    "fieldData": {...},
    "portalData": {
     portalLayoutObjectName: [...],
    },
    ...
   },
   {...}
  ]
 },
 "messages": {...}
 "fieldData": "...",
 "portalData": 
 ...
}

fm-csv2json

A CSV Parser that converts CSV into JSON on the FileMaker Pro Platform.

I was browsing over at the FileMaker forums and came across a question about parsing CSV data.

This caught our interest and made us ask the question.

Could we take some CSV data and transform it into a valid JSON Object?

The answer was yes and with that we present fm-csv2json.

A FileMaker script which when passed a valid CSV string, will covert this string into a JSON object.

Download free over on Github.

We also have a similar parser that turns XML into JSON too.

fm-xml2json