It appears that you have this relationship:
Client::__pkClientID = Treatments::_fkClientID
Though my names may differ from yours.
I would also guess that your "consent form" layout is also based on Treatments so that you can collect consent for each and every treatment. If not, it should be from what I can tell from your initial post.
If that all is correct, then you can place a button inside the portal row that performs a script step similar to this:
Go To Related Record [Show only related records; From table: Treatments; Using layout: "ConsentForm" (Treatments) ]
Your Consent Form layout can include a button to click in order to return to the original layout.
Or you can use the New Window option in the Go to Related Records step to open the ConsentForm in a new window. Then you can return to the original layout just by closing that window.
Thanks for this I know its close, still doing the same. Not sure what the first setup is on here with the client. I am pretty new so still working my way round. Could you possibly give me a walk through. Really do appreciate your help
- Enter layout mode.
- Click on the button tool
- Draw small rectangle inside the portal row where you want this button.
- Button setup opens automatically.
- While it's usually better to use the Perform Script option with nearly all buttons, for this example, select the Go to Related Records option.
- Click Specify
- Select a name from the first drop down that exactly matches the name found in "Show Related Records From" in portal set up for your portal. This text should also appear in the lower left corner of your portal when in layout mode.
- From the second drop down, select the name of the layout that displays your consent form (this layout must specify the same table as your portal or this won't work)
- Select "show only related records" "Match current record only"
- Click Ok to close dialogs until you are back to the layout.
- Enter label text for the button if you want to.
- Drag the button if needed, to make sure that it is fully enclosed in the portal row. If using Filemaker 12 or newer, drag the portal a few pixels to make sure that the button moves when you move the portal.
- Return to Browse mode and try it out.
Oh my god so sorry, its driving me mad. Have done the above but the button in portal 1 and then portal 2 opens the same form. Any ideas where I'm going wrong
Go to the layout for the consent form. In Layout Setup... for this form, what table occurrence is named in the "show records from" drop down?
Check the fields on the layout by clicking them while in layout mode and checking the names shown to the left of the :: in "Display data from". Does that name match the name in the "Show records from" drop down for the layout?
Yes, thank you so much got it to work its was the last action that sorted it. Ill be able to sleep tonight thanks