I am not sure exactly what "different layout with a portal showing products in groupings, ie., plumbing electrical" means. What table? I'll assume it is a Product table. But you say "a portal", rather than "portals" (for the "groupings). A single portal on a Products table layout makes no real sense; nor really does "groupings" in a single portal (usually).
Using a general word like "groupings", without specifying what that means in FileMaker specific terms, is confusing (to me), when it must be interpreted when trying to give structural advice. This is an almost universal problem with technical discussions.
Possibly it's an Estimate layout, with a portal to Products? But why not a Products table? Why not a List view instead of a portal?
But the technique is much the same whenever working between 2 portals. You need to know/store where you are when you start, then you need to capture the new value, then go back to the original portal row/record and add/modify the original field's value.
In this case, you could capture the portal row number via Get (PortalRowNumber); store it in a global. Then go pick your Product. Capture it into another global (ID would be best, but name would do for now). Then go back to your original layout,
Go to Field [ portal relationship::field ]*
Go To Portal Row [ captured portal row # ]
Set Field [ the field ; captured product ]
Go to Field [ portal relationship::field you want to go to next ] or Commit Record (if you're done, not likely)
The problem with this technique is that it is a 2 step process, somewhat disconnected. When you click the button in the Products portal (wherever/whatever it is), you are going to be using that to set a field which can no longer see, or really know about, other than having captured its portal row number. If you just wandered into that layout, you would have no idea what record it would modify.
The only safe solution is to dedicate that "choice" layout, use it for nothing else, and only go there as the middle step in the process.
* It may seem odd to go to the field first, then to the portal row. But going to a field is what determines WHICH portal, if multiple portals are on the layout.
Thanks Fenton for your reply.
`I am new to filemaker and after reading your response realise how inadequate my initial request was. So here goes .
I have 3 tables Clients, Jobs , job details all linked with one to many unique ids. I have set these up with a form displaying clients with their respective jobs on a portal. On selecting a job from the portal it opens a new form with the related job but now showing the job details on a portal. The job details consist of products and its associated costs which are then summarised to give a value to the estimate. Products are linked to product type which is linked to product group ie Plumbing _ sinks_ Roca 450 basin. In the job details portal I have created the product field as a drop down list so I can add new products and its associated costs.
I am having difficulty making this work as there are a 1200 products. I would normally (in access with dependant drop down lists ) filter the list down by product group, product type to reduce the choice to a manageable size. Can you suggest an appropriate way to address this issue for me
Colin (Bob the Builder)
thanks I will work on it