Go to Related Records can be set up to bring up that record on a form view layout for editing. It can switch layouts or open the layout in a new window.
How do I create the button? Do I do it on the record form or on the form with the portal?
Thanks for the reply.
There's a button tool in the status toolbar when you are in layout mode. Just drag and drop from this tool to your layout to create a button. A dialog called button setup will then appear. You can also select an object on your layout and choose button setup... from the Format menu to turn that layout object into a button.
Since you want to go from the layout with the portal to a layout with a detail view of that portal row record, you would place this button inside the portal row. You can even select all the fields in the portal and use button setup... to turn them into a button that does the GTRR to pull it up on the other layout. That way, a mouse click anywhere in the portal row will produce this result.
Thanks, that worked perfectly.
Now, just to annoy you a little bit more, how can I create a new record using the same method? If I click in the portal field it starts to create a new record but it doesn't allow me to click the Edit button to work on the new record in a form UNLESS I save some data first.
I would like to be able to click the New button that would bring up a window with the form that I can fill in.
I'm thinking this would require some form of scripting because it would need some form of committing data to then be able to edit that data or am I complicating things too much.
I appreciate your help greatly.
First put the button to add a new record outside the portal.
The script for adding a new record via the detail layout might look something like this, but use your names in place of mine:
Assuming that you have this relationship:
LayoutTable::PrimaryKey = PortalTable::ForeignKey
Set Variable [$ID ; value: LayoutTable::PrimaryKey ]
Go to Layout [ select same detail view layout that you specify in the go to related records step here]
Set Field [LayoutTable::ForeignKey ; $ID ]
When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.
It took me a little bit to work out how to do this but I now have a window that pops up with the form I want and it now adds the details in correctly.
You have helped me immensely. Now I'm beginning to regret not getting into FileMaker Pro sooner. :-)