Can you please post the script you are using in the button in the upper portal? Normally that script would set a field with the order ID and then a relationship would be built from that field to the Line Items table.
Also, please indicate which fields are used in your current relationship between the Order table and the LineItems table.
Are you passing the Object Name of the second portal when you call the Refresh Portal step? If Object Name is not specified, Refresh Portal refreshes the active layout object.
The script only has one line: Refesh Portal [Object Name: "Order_Details"] ... Order_Details is the name of the Details portal.
The upper portal (Orders) lists all open orders for the customer. The lower portal (Details) lists the line item details for whatever order is selected from the Orders portal. The relationship uses the sales order number field (sono).
The relationship is working because the line items are being displayed correctly for the first order in the list. It's when I select a different order that the Details portal is not being refreshed. Probably something simple right in front of my nose ... just not seeing it.
1 of 1 people found this helpful
Just because it looks like it is working, doesn't mean it is working the way that you think it does.
When working with related records, FileMaker defaults to showing the first related record. This is likely why you are are seeing the details for the first order.
In your Orders portal, change the script to set a global field in Orders to the selected Order ID. Then have a table occurrence that connects the global selected order ID to the order ID in the Details and base your lower portal on that table occurrence.
What is the base table occurrence for the layout, if both Orders and Order_Details are portals?
I was able to get it to work, thanks. I had to throw in a refresh window command, but it does what I want.
Appreciate the help!