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": 
 ...
}