getRelatedSets() Returns One Result for Multiple Portals
Operating system version
Description of the issue
When calling getRelatedSets() for a layout through the FileMaker PHP API, a single result is returned if there are multiple portals based upon the same table on the given layout. This is true even if the portal objects are given different names in Inspector.
This prevents getting different arrays for portals with different filtered results from the same related table.
Steps to reproduce the problem
Create a table of Parents and a table of related Children.
Create a layout based on Parents
Add a portal of Children named "Sons" with a filter of "boys"
Add a second portal of Children named "Daughters" with a filter of "girls"
Use the following PHP code to return the list of portals:
$relatedSetsNames = $result->getRelatedSets();
Here are the portals:";
foreach ($relatedSetsNames as $relatedPortal)
echo '' . $relatedPortal . '';
Note that only one portal is listed and the resulting getRelatedSet('Children') array contains only the boys.
Two related sets, "Sons" and "Daughters" should be available.
Only the "Sons" portal is available as table "Children"
We could create separate layouts with each portal and build the arrays for display.
We could also create multiple table occurrences for every filtered portal.
But shouldn't the portal object names be available for calling with getRelatedSet()?