I've been using the new Execute FileMaker Data API
script step and I've noticed that portals on the designated layout are limited to returning a maximum of 50 records.
The DataAPI documentation mentions that the default limit is 50 records and you can specify an offset and limit for specific portals:
To return data for specific portal rows, use
_offset.portal-name
and_limit.portal-name
. A portal name can be either the object name shown in the Inspector in FileMaker Pro or the related table name. If you omit the offset and limit values for portal rows, the default for offset is 1 and the default limit for portal records is 50.
While the Execute FileMaker Data API documentation describes how to specify a limit and offset, its only for the parent record:
{
"layouts": "MyLayout",
"limit": 2000,
"offset": 1
}
Attempting to limit a portal like this is not valid:
{
"layouts": "MyLayout",
"limit.portalName": 60,
"_limit.portalName": 60
}
Returns an error like:
{
"messages" :
[
{
"code" : "1708",
"message" : "Unknown key (limit.portalName)"
}
],
"response" : {}
}
You can change the portal on the layout to restrict the results:
- disable the scrollbar
- change the starting row
- change the number of rows that are displayed
This will work to limit the records, but again you are still limited to the default of 50 records.
One workaround might be to place multiple portals on a layout:
Portal 1: Starting record 1
Portal 2: Starting record 51
Portal 3: Starting record 101
... and so on
Then combining them all together manually from Execute FileMaker Data API
results. Seems pretty clunky.
Wondering if anyone has found a way around this?
I've attached the example file I created while testing this out, if you want to experiment for yourself.
PerformDataAPIPortalIssue.fmp12 (336 KB)