1 2 3 Previous Next 37 Replies Latest reply on Jun 23, 2017 11:06 AM by king_arthur

    Beekeeping Solution next Question


      OK reaching out for another step help that I can't seem to figure out:


      I have a one to many relationship from Apiary to Hives:



      Apiary::__ID_Apiary = Hive::_id_apiary


      I am able to create A New Apiary then Add and Delete New Hives... So i have a Layout "New Apiary" [linked to Apiary Table] with two buttons: one that takes me to to the "Edit Layout" for the Current Apiary - the other Button takes me to another Layout "Hives in Apiary" [linked to the Hive table] that lists the Hives Related to the Apiary.


      That much works - i have some scripts to assist in the some of the creation.. now i am moving to my next step and i seem to be hitting a strange road block.


      So on the Layout "Hives in Apiary" I have four Buttons but i am only going to focus here on the one "Inspection"


      I have a one to many relationship from Hive to Inspection [each hive can have any number of inspections]


      Hive::__ID_Hive = Inspection::_id_hive


      My understanding is the relationship is the same as as with Apiary and Hive


      I click the Inspection Button to go to the "Inspections in Hive"[linked to Inspection table] Layout. but there seems to be a problem :


      This operation could not be completed because the target is not part of a related table


      so the button has the following Step

      [Go to Related Record [Show only records; From table: "T2_Hive"; using layout: "Inspections_in_Hive" (T2_Hive)]

      where T2_Hive is the relationship table name for Hive in the relationship to Inspection.


      My thought i should be take the the "Inspections_in_Hive" layout but instead i get the error that the target is not part of a related table


      What am i not getting here....

        • 1. Re: Beekeeping Solution next Question
          Stephen Huston

          Your inspection layout should probably be based in the table for inspections rather than Hives.

          • 2. Re: Beekeeping Solution next Question

            And have you considered setting up a portal for this instead of separate layouts?


            From a layout based on Apiaries, you could have a portal to hives for listing the hives in that apiary. A layout based on Hives could list all inspections for that Hive. There are even ways to set up a portal to Hives on your apiary layout so that clicking a hive causes their inspection record to appear in a different portal.

            • 3. Re: Beekeeping Solution next Question

              Yes I have thought of using portals. Since each of the layouts I am working with right now are in List View. And a portal is a List View type Object.


              The reason I have it setup in separate layouts is I don't want a raw data View of my database. I am learning filemaker as I go, and want to develop something that looks nice as well as stores data.

              So it looks like an App not a database per say.


              So is there a way to go from

              Apiaries layout

                  Click add hive

                      Goes to List View layout of hives in Apiary

              Here's where the initial question started


              Then in that hive List View click the add inspection button for a particular hive

                       Goes to the List View layout of inspections for that hive


              I will try to grab some screen shots of those layouts and maybe that may help in my description.


              It just seems silly that this basic aspect of I am having trouble with, but I figured out out to scrape and store weather data for my inspections

              • 4. Re: Beekeeping Solution next Question

                Portals are not a "raw data view", so that reason for not using portals puzzles me. Portals are a standard data entry tool for working with multiple related records from the context of the single parent record to which they are linked. The standard default "view" for a portal is table like, but it's far from your only option for how to configure a portal.

                • 5. Re: Beekeeping Solution next Question

                  Really. I am new to the FileMaker world and this is my first real project in it. I was unaware that you could manipulate the views for a portal.



                  So I could then create a layout that has a portal that does the same as my list view layout?

                  • 6. Re: Beekeeping Solution next Question

                    Yes, and with the added benefit that it's from the context of the parent layout.


                    Take a standard sales invoice for example. You have one sales transaction but need to list multiple items purchased in that transaction, the quantities and costs for each. You can set up a portal on an invoice layout to list the items purchased with any needed formatting, value lists, conditional formatting etc. you might need, but since it's on the Invoice layout in a portal, this is just one part of the total layout and other parts may be used as needed to display customer information, date, sales tax, etc.

                    • 7. Re: Beekeeping Solution next Question

                      thanks for you response but i am still kindof stuck... maybe if i can send you a copy of my file and you can see what i am talking about.


                      But i am not sure how through this forum..

                      • 8. Re: Beekeeping Solution next Question

                        You can attach a file using the advanced editor in the upper right of the reply box or simply paste in a dropbox link.


                        You can have and apiary layout with a portal to Hives and a portal to Inspections that will show inspections for only the hive selected in the Hive portal. All in one layout and not too difficult.

                        • 9. Re: Beekeeping Solution next Question

                          We tend to begin thinking of a portal as a one row of a few fields but the portal line can be sized to display a large layout and then scroll between the records of the related table.


                          This layout can also have fields from tables releated to the related table but not portals to those tables.


                          Since you want it to look like an app you might consider sliding panels especially in IOS.


                          A sliding panel can have many panels and each panel can show selected data from the current record or portals to other tables.

                          • 10. Re: Beekeeping Solution next Question

                            "A sliding panel can have many panels and each panel can show selected data from the current record or portals to other tables."


                            A sliding panel can also have just three panels yet be used to work with an unlimited number of related records one at a time. This is an advanced technique so don't try it yet, but keep it in mind as your skills grow.


                            You say say that you are stuck. Tell us how you are stuck. It might be something simple.

                            • 11. Re: Beekeeping Solution next Question

                              So I attached a copy of my Working file... there is some other stuff in there that i will be working one once i get passed this:

                              so just a simple walk thru in pictures:


                              Start in the Main Menu Layout:

                              Screenshot 2017-06-22 10.47.17.png

                              So I would click on the Apiaries Button and it will go to the Add Apiary Layout: (I have some dummy data in there)

                              Screenshot 2017-06-22 10.47.36.png


                              The Layout is a List View [ I did set up another file with the suggestion of using a portal - got it to look just like the above and function the same but i really hate the Ghost row... and i haven't played with figuring out the script to create the related record so i can remove the create record in the relationship.]


                              So if you click Edit - it brings you to the Edit layout for the Apiary.

                              If you click Hives [the number is the number of hives in the apiary] a script runs that checks if there are any hives in the Apiary - if not it creates a "New Hive" and goes to the layout of "Hives in Apiary"


                              below is is one row of the "Hives in Apiary" but it is a list view layout so each line would have a hive. Edit - takes you to the Edit layout for the Hive.

                              Screenshot 2017-06-22 10.47.57.png


                              This is where i can t get past: I click on Inspection. Like Apiaries i want to have the number of inspections in that Hive show [like the number under Hives above] - And if there are 0 inspections to create one like Hive button does in the script above. But it seems that i must not be thinking my relationship right or something cause i cannot get it to work like i got Apiaries and HIve.


                              Maybe i am thinking the relations wrong ---

                              • 12. Re: Beekeeping Solution next Question

                                Yep, you have relationships problems.


                                Your list view layout of hives is based on T1a_Apiary_hive, but that occurrence of Hives does not have a relationship to an occurrence of Inspections. Your Inspections TO is linked to a different occurrence of hives T2_Hive. This is an example of what we call "context". The table occurrence you select in layout set up for a layout set's the context for what you put on that layout and any script steps that execute while this layout is the current layout.


                                You can base your Hives layout on T2_Hive and your Go To Related Records step will still work. This requires changing the table occurrence selected in Layout Setup and also updating each field on your layout to be selected from the T2_Hive occurrence instead of  T1a.

                                1 of 1 people found this helpful
                                • 13. Re: Beekeeping Solution next Question

                                  So this is the Current Relations table as you point out above:

                                  Screenshot 2017-06-22 11.31.36.png


                                  So are Your meaning to change it like this:

                                  Screenshot 2017-06-22 11.35.34.png

                                  Which case i will change the TO names later.

                                  • 14. Re: Beekeeping Solution next Question

                                    OMG... how silly Ok i got that now working Thanks for everyone .... the next big part is going  to be the equipment section cause it is going to be a "Line Item" type setup... but i have to build the Inspections section now that i have it creating records and proper relations...


                                    So I am sure i will be back here...

                                    1 2 3 Previous Next