sam_thwaites
asked on
show 'X' amount of records from a related set
How do you show only the first 'X' amount of records from a related set on the web using filemaker API PHP?
I have 20 records in the related set, however I only want to display the last 5 records. On my filemaker web layout the related set portal is set to view only 5, with scroll bar inactive.
Currently the web outputs all 20 records in the related set.
I have 20 records in the related set, however I only want to display the last 5 records. On my filemaker web layout the related set portal is set to view only 5, with scroll bar inactive.
Currently the web outputs all 20 records in the related set.
Using function:
$relatedset = $xxx->getRelatedSet("TABLE");
<? foreach ($relatedset as $record) {
echo $record->getField("TABLE::name_item");
} ?>
break the loop when you reach 5 records?
ASKER
I'm not sure how to break a loop, can u please show me some example code. Thanks lesouef
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.