I have 3 related tables:
Customers -> Orders -> Lines
I have a Customer Form Layout that has 2 Portals (Orders & Lines)
I'd Like to Filter the result of "Lines" by selecting a record in "Orders"
Is this possible?
Good afternoon sawhat,
I hope you had a wonderful weekend. Here is an alternative method you may want to consider, if you're familiar with it; Selector Connector. It accomplishes the portal filtering via relationship that beezer's method does, gives you the ability to add new line items to a selected order via the same portal, and makes the desired line items available via portal from any context. I've attached a rough sample file for you to look over, if you choose to explore this method. Have a great day!
One quick way of getting it done is to use a global field "g_Order_id" that would populate with the customers "Order" primary key "ID_Order".
First set a relationship (Table Occurrence TO) using your new global field to your lines table. You can use Get(scriptparameter) to capture the Order id, then set it to the global field. The portal will then show the related records "Lines" based on the captured order id.
Make your "ORDER_portal" row a button that runs the script "Set Global relationship key" that would capture the order primary key and set it to the global that would then filter your portal in "order_LINEITEM_global"
Sounds reasonable. I'll give it a try.
Thank you so much.
I will take a look at your solution and let you know how it works for me.
Have a great day!!!
Retrieving data ...