You need to describe the design of your layout and how you set up your relationships in order for us to understand what needs to be changed in order for this to work for you.
Might you have separate tables for each of the following linked in these relationships?
Goals----<Strategies-----<Actions----<Targets------<Measures (----< means "one to many")
Is your layout based on Action with a portal used to list Targets?
Or is it a list view layout based on Targets?
Exactly how did you attempt to "add a measure to the target".
Yes Phil, that is how I have my database set up - with separate tables for each. The goals layout (list view) displays all the goals. The strategies layout (form view) shows the goal, and lists the strategies in a portal. The actions layout (form view) shows the goal and strategy and lists the actions in a portal. The targets layout (form view) shows the goal, strategy and action and lists the targets in a portal. This is all working fine, until the next step. When I go to the measures layout it does not show the correct goal, strategy, action and target for that measure.
Thank you Phil for responding, I would really appreciate your help.
PS. I neglected to answer your final question. Adding a strategy, action, target or measure is done within the portal on each of the layouts.
When I go to the measures layout it does not show the correct goal, strategy, action and target for that measure.
How do you "go to the measures layout"?
Is the measures layout a layout based on Targets with a portal to Measures?
Yes, the measures layout is based on targets with a portal to measures. Inside each portal is a 'manage' button against each item in the list, which goes to the next layout. For example, the targets layout has a portal listing the measures, and each of these measures has a 'manage' button which goes through to the measures layout.
PS. When I say 'manage' I only mean that this is the label on the button. I probably didn't need to say that as it may have confused you. I apologise.
but what script step did you select for that "manage" button"
Go to layout or some other script step.
Go to layout won't work reliably for this in any of your portals as it just changes layouts. I doesn't do anything to find the same record as that in your portal row where you clicked the button.
This will be my problem then Phil, as I am only using 'go to layout' on the button. Would you suggest to me what script I should be using? I have to admit I was wondering how it was managing to work out the correct record all by its lonesome, but it seemed to be working perfectly until I got to this particular layout. :)
Use this script for each of your portal row buttons:
Go To Related Record [Show only related records; From table: Portal Table; Using layout: "Portal Table" (Portal Table) ]
This will make the clicked portal record, the current record on the specified layout.
Thank you so much for your help. I am going to attach several images which show what I did to attach the script to the button. Would you let me know if I have done this correctly?
The problem is not resolved therefore I have to assume I have done something incorrect.
a) you should be using button setup to specify button options for your button not a script trigger. Button Setup is found in the format menu when in layout mode. (and if you used the button tool to create the button, you can open button set by double clicking the button while in layout mode.
b) you have entered the Go to related records step as quoted text in the optional script parameter box. This box is used to pass data to a script in order for the script to access that data with Get ( ScriptParameter). It's the wrong place to put an actual script step. You'll see this same dialog when specifying a script for a button. (But you can also just select a single script step from a list) If you choose to use a script, your next step would be to select a script in the list, or click the + button to start a new script, then use Edit in the Gear menu to edit that new script.
Phil I cannot thank you enough. This is exactly what the problem was. I had all the other buttons set up correctly to go to related records, however the last button was set to 'go to layout' instead. I knew it would be somethings so simple that I'd overlooked. I was so convinced that it was to do with the relationships, it didn't occur to me to rethink the way I had the button set up. I won't make that mistake again!
Have a great day and once again I thank you for patiently talking me through it. :)