1 2 Previous Next 19 Replies Latest reply on Dec 29, 2015 5:29 AM by Todd Geist

    Selector/Connector implementation question

    BillisSaved

      Good evening everyone,

       

      I hope you had a merry and blessed Christmas! I've been attempting to implement the Selector/Connector relationship graph model into a solution I'm currently building and, I'm embarrassed to say, I'm having some difficulty getting it to function as expected. I believe I have a decent grasp of the theory behind the Selector portion of this design methodology, it's the connector that has me scratching my head. I'll try to provide a simplified example of the issue I've been unable to solve in the hope that one of you can render some much needed assistance:

       

      Table 1: Name

      Field Name    Field Type     Storage

      Name             Text

      z_xJoin           Number        Global

       

       

      Table 2: Graphic

      Field Name    Field Type     Storage

      Graphic          Container

      z_xJoin           Number        Global

       

      Table 3: Connector

      Field Name    Field Type     Storage

      z_xJoin           Number        Global

       

      I've created the following cartesian relationships (cross-joins):

       

      • Connector::z_xJoin <-----X-----> Name::z_xJoin
      • Connector::z_xJoin <-----X-----> Graphic::z_xJoin

       

      Each table contains a single record and I've set the value of all z_xJoin fields to the number 1.

       

      I expected to be able to create a layout based on the Name table and insert a container field, which pointed to Graphic::Graphic, and display the its contents. It didn't work. The container field is blank. I suspect the relationships I've created using global fields, which allows me to access all the available data, are the source of the problem because they are not indexed fields. Therefore, FileMaker won't display a specific record even though there is only one in each table. Can someone please help me understand what I'm doing wrong? Thanks in advance for any assistance and/or advice you are willing to provide!

       

      God bless,

       

      Bill

        • 1. Re: Selector/Connector implementation question
          Todd Geist

          Hi Bill,

           

          From what I can tell from your description, it should work just fine.  A Cartesian join doesn't require the fields to be indexable. So that should work just fine.  If you want to create a simple example file and post it here, I'll take a look.

           

          Happy Holidays

           

          Todd

          • 2. Re: Selector/Connector implementation question
            BillisSaved

            Hey Todd,

             

            Thanks so much for your willingness to help me! I reviewed all of the material I could find associated with Selector-Connector, but apparently I can't see the forest for the trees. As per your request, I've attached a very simple example file, which uses only the Connector portion. Please let me know if you need anything else. Thanks and have a great day!

             

            God bless,

             

            Bill

            • 3. Re: Selector/Connector implementation question
              BruceRobertson

              It seems odd to describe a problem which does not allow you to select a record; and then post an example which has no SELECTOR feature.

              Further, the basis for selecting a record is its ID. None of your tables have ID fields.

              • 4. Re: Selector/Connector implementation question
                BillisSaved

                Hey Bruce,

                 

                I hope your day is going well. I was under the impression that this particular design method would allow "universal" access to data contained in utility tables without the need for the Selector portion. Am I mistaken?


                God bless,

                 

                Bill

                 

                • 5. Re: Selector/Connector implementation question
                  BruceRobertson

                  "Therefore, FileMaker won't display a specific record"

                  You state that you want to display a specific record.

                  So your request is quite confusing.

                  Also, a point you seem to have missed is that there must exist one record in the CONNECTOR and SELECTOR tables and you have zero records.

                  • 6. Re: Selector/Connector implementation question
                    BillisSaved

                    Hey Bruce,

                     

                    As you have pointed out, there are definitely gaps in my understanding of this method. I'm also pretty sure I've made some incorrect assumptions. Though I think you may have diagnosed the problem, which is the lack of a Connector record. I modified the zg_Connector::zg_xJoin field by placing a number 1 into it, but I did it without first selecting New Record. As soon as I remedied this - selected new record and then entered a number 1 into the field - the Connector worked as expected. Thanks so much for your expertise and assistance! Have a great day!

                     

                    God bless,

                     

                    Bill

                    • 7. Re: Selector/Connector implementation question
                      BruceRobertson

                      That allows the first graphic to be visible.

                      But if you have multiple graphic records, you won't be able to see them or select them or associate a graphic with a name.

                      • 8. Re: Selector/Connector implementation question
                        Todd Geist

                        Bruce,

                         

                        I asked Bill to send a simplified example of what he was trying to do.  It was clear to me that the question was about Connector and the universal access it provides. He did a good job of including only the parts of the graph that he wasn't clear about in the example file. It was immediately clear to me what the problem was based on the example file.

                         

                        So Bruce, Happy Holidays :-)

                         

                        Todd

                        • 9. Re: Selector/Connector implementation question
                          BruceRobertson

                          And the problem was.. ?

                          • 10. Re: Selector/Connector implementation question
                            Todd Geist

                            Bill,

                             

                            As Bruce so nicely pointed out, the lack of a record in the Connector table was the problem.

                             

                            Selector and Connector both need a single record.  The global keys you use for the Cartesians joins can be empty or they can have any number in them. It doesn't matter what it is. They must be globals though.

                             

                            There times when you will need to refresh these Cartesian joins and to do so you simply set a different value into the key field.  I usually do this by using Not GetAsBoolean( globalKeyField). This sets the field to 0 or 1 depending on what is there.

                             

                            Hope that helps ;-)

                             

                            Todd

                            • 11. Re: Selector/Connector implementation question
                              Todd Geist

                              As for storing multiple graphics.  I don't think Bill was going to use multiple records I think he was going to use multiple fields.  Which is what I do.  Each graphic gets its own field.  And you display the one you want by, well just displaying it.  :-)  Really simple that way.

                              • 12. Re: Selector/Connector implementation question
                                BillisSaved

                                Hey Todd,

                                 

                                You are correct, I am planning to use a single record with multiple fields. I am a one-man-show so to speak and the benefits of the code modularization provided by the Selector-Connector methodology, which you and the guys from SeedCode have refined and popularized, will provide huge gains in my development efficiency...assuming I don't continue to foul things up. Thanks again for your help, and yours too Bruce. I hope the your new year is a blessed one. Have a great day!

                                 

                                God bless,

                                 

                                Bill

                                • 13. Re: Selector/Connector implementation question
                                  BruceRobertson

                                  Mind telling us what the multiple fields in this single record represent?

                                  • 14. Re: Selector/Connector implementation question
                                    BillisSaved

                                    Hey Bruce,

                                     

                                    My idea, which is based on Todd's video and sample file, is to replace what would typically be a utility table, filled with global fields containing data utilized throughout the solution, with a table that requires only a single global field yet yields the same "universal" access. At this point, I'm not sure that there is any significant advantage gained with this approach, aside from proficiency with this method and the inherent modular nature of the Selector-Connector design methodology.


                                    I'm quickly becoming aware, as I increase my experience with FileMaker, that there are multiple ways to achieve most any goal using this software development environment. And while being well versed in multiple methods has obvious advantages, for someone relatively new to FileMaker like me, I find standardization and modularization offer more immediate benefits than omniscience. I am, however, insatiably curious and will continue to do everything I can to learn and grow. With the continued help and support of more experienced people like Todd and you, I'm confident my learning process will progress quite nicely. Have a great day!


                                    God bless,

                                     

                                    Bill

                                    1 2 Previous Next