Use your button to run a script like this:
Set Variable [$Lab ; PortalTable::LabField]
Close Window //close the pop up window
Set field [LayoutTable::LabField ; $Lab]
I suspect that LabField should be your serial ID field for identifying the Lab by ID number. If you have the right relationship set up, you can place the lab name field from the related field on your layout and the script's set field step will cause it display the correct name after you click the button in the portal row of your pop up window.
I tried the solution you suggested, but I still can't get it to work. My problem really is understanding variables and script parameters and their use. I have several books on Filemaker and have read all the information about them and still don't understand. The frustrating part is that everything else works well, but I just can't get the field to populate with the test name and cost. Yikes!
The sample I posted does work. I use it all the time. Please note the assumptions I made and listed at the bottom of my last post as they are key to getting this to work.
Feel free to describe your scripts and set up in more detail and how the suggested script failed and then we can take another crack at figuring out something that will work.