4 Replies Latest reply on Jan 7, 2013 12:14 PM by StephenWonfor

    X-post: TT & FMX & Darts A question about context and its effects

    StephenWonfor

      Hi

       

      I am doing some reno's on a system I built in late 2004 using Filemaker 7. A new world for sure back then and much to learn - all of which I did during this build. 8 years later I have been called back in for some updates.

       

      Some issues:

      1. Relationship graph design seems to have been a mutant variant of "Offset Twisted Spider"™.

      2. 3 other programmers - none Filemaker at heart - have "adjusted" the database over the years.

      3. I became an "Anchor Boy" - the design philosophy works well for me and I "get" it.

      4. Anchor Boys, this one anyway, are afraid of Spiders.

       

      So...

       

      I am thinking about adding some TOGS to suit the purposes of the update. All updates are in regard to calculations. What I am thinking about is adding some TOGS to base calculations upon - and thus I find the "evaluate this calculation from the context of" matter becoming of first importance. In my AB world I have always used the base table as the context for calculations. Now I am wondering, due to design complications whether I can create some new AB TOGs to derive my calculated values and still have them function as expected when viewed in other TOGs.

       

      The main issue is 5 anchor tables that are sadly linked together - these account for 90% of the "traffic" in terms of calculations and scripts. Rather than deconstruction - no budget for that - I just want to get these new calc's enabled so I am hoping I can use my new AB style TOGs to implement this. It seems like it will work but I'd like to confirm prior to starting in on them. The gist of it being that my new calc's will use the same base tables but different instances of them.

       

      The attached image shows before and after doing a rearrangement of the RG - the heavy purple lines reflect calc and script traffic that fall afoul of AB "logic".

       

      Stephen

       

      ----

       

      "There is so little difference between husbands you might as well keep the first." ---- Adela Rogers St. Johns

       

       

        • 1. Re: [X-post: TT & FMX & Darts] A question about context and its effects
          BruceHerbach

          Stephen,

           

          I took a look at your before/after picture,  mutant is a nice description of the before side.  I really understand your desire to use Anchor bouy.  I have worked on solutions that use spider or other mutant graph arangements and found it helpful to leave the graph more or less as is and add notes in the graph for the TOs  that are pseudo anchors.  These are the TO that would be the anchor and the layouts and calculations are based on them.  Not as neat,  but lets me think about how things work in an ABish way. It makes it easier for me to understand how the existing calculations and scripts work.  It does save a lot re-development time since you are not breaking any of the existing calculations or scripts.

           

          I have also found it useful to add a limited number of Anchor bouy TOGs for new work and base my calculations and scripts on these.   In most cases,  I'm starting the process with a script. At the beginning of script is a GTRR to a blank layout built on the AB TOG in an off screen window.  So I end with the correct record/record set in the correct context. At the end of the script I commit the record,  close the off screen window,  select the original window and refresh the screen.   If everything is setup correctly the user should see the correct results on the screen.

           

          HTH  Best of luck with your project.

          Bruce Herbach

          Herbach Consulting

          FileMaker 9,10,11 Certified Developer

          • 2. Re: [X-post: TT & FMX & Darts] A question about context and its effects
            StephenWonfor

            Bruce

             

             

            Thanks for the reponse as it matches my expectations - which is always good.  I am going to create some new TOGs for my purposes.  My concern was that a calc based on one TOG might not work on a different TOG that uses the exact same base tables.


            Stephen

            • 3. Re: [X-post: TT & FMX & Darts] A question about context and its effects
              BruceHerbach

              Stephen,

               

              If a calc is unstored it seems to be ok.    Attached is a test DB with a few unstored calcs.  It has three TOGs each with a layout built on the anchor.  If I add records to the data TOG and refresh a window built on any of the TOGs the Calcs show the correct answer/same answer as the layout built on the TO with the correct context.

               

              You might want to play with this add some stuff like auto enter calcs etc just to get a better feel.  The key seems to be doing a refresh window step.  I noticed that even the layout in the correct context didn't nessasarily update the displayed data when I added/updated records in another window.  Probably why the last step when creating records in an off screen window requires a refresh window step when the window is closed and you return to the main window..

               

              Hope this helps.

              Bruce

              • 4. Re: [X-post: TT & FMX & Darts] A question about context and its effects
                StephenWonfor

                Bruce

                 

                Thanks for that - it confirms what I have been hoping was the correct path.


                Stephen