1 2 Previous Next 16 Replies Latest reply on Jul 30, 2015 4:42 PM by TiffanyMeek

    Relationship not working on layout

    TiffanyMeek

      Title

      Relationship not working on layout

      Post

      Hi there

      I'm fairly new to FileMaker, and I've started working on a project management solution for our company. One of my layouts is not working as I would expect, in terms of the data populating the layout, which seems to have something to do with how I have set up my relationships. I can't for the life of me work out what I have done wrong. I would so appreciate some assistance.  Thank you in advance.

      Within my solution the user can create a series of Goals. Those Goals can then be divided into Strategies. Each Strategy can then have Actions. Those Actions can have Targets. And lastly, those Targets have Measures. So for example, I might have a screen which shows Goal 2, Strategy 4, Action 3 and a list of its Targets. All works fine to this point. If however, I then try to add a Measure to the Target the screen throws up data from a different Goal.

      Tiff Meek

       

        • 1. Re: Relationship not working on layout
          philmodjunk

          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".

          • 2. Re: Relationship not working on layout
            TiffanyMeek

            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.

            • 3. Re: Relationship not working on layout
              TiffanyMeek

              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.

              • 4. Re: Relationship not working on layout
                philmodjunk

                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?

                • 5. Re: Relationship not working on layout
                  TiffanyMeek

                  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.

                  • 6. Re: Relationship not working on layout
                    TiffanyMeek

                    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.

                    • 7. Re: Relationship not working on layout
                      philmodjunk

                      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.

                      • 8. Re: Relationship not working on layout
                        TiffanyMeek

                        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.  :)

                        • 9. Re: Relationship not working on layout
                          philmodjunk

                          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.

                          • 10. Re: Relationship not working on layout
                            TiffanyMeek

                            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.

                             

                            • 11. Re: Relationship not working on layout
                              TiffanyMeek
                              /files/a68da8e62f/Screen_Shot_2015-07-30_at_12.17.46_pm.png 503x470
                              • 12. Re: Relationship not working on layout
                                TiffanyMeek
                                /files/4e3ea8d944/Screen_Shot_2015-07-30_at_12.18.15_pm.png 869x427
                                • 13. Re: Relationship not working on layout
                                  philmodjunk

                                  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.

                                  • 14. Re: Relationship not working on layout
                                    TiffanyMeek

                                    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.  :)

                                    Cheers
                                    Tiff

                                     

                                    1 2 Previous Next