9 Replies Latest reply on Apr 30, 2017 7:23 AM by tays01s

    Navigating tabs

    tays01s

      I am trying to create a new 'Biochem record' (Biochem table) in a portal (Biochem object) on the tab_Biochem object tab of Patient_U layout (Patient table), script below:

       

      1 Freeze Window

      2 Set Variable [ $BiochemID; Value:Patient::__uuID ]

      3 Go to Layout [ “Biochem” (Biochem) ]

      4 New Record/Request

      5 Set Field [ Biochem::_PatientuuID; $BiochemID ]

      6 Go to Layout [ “Patient_U” (Patient) ]

      7 Go to Object [ Object Name: "tab_Biochem" ]

      8 Go to Object [ Object Name: "Biochem" ]

       

      Though the above works, because I have set another tab (tab_Calc) on the Patient_U layout as the tab to go back to as std, despite 'Freeze Window', the user is first taken to Calc tab, before seeing Biochem object. BTW, line 7 is probably obsolete; it didn't make any difference.

       

      Can I create a new Biochem record without the user seeing the switching between records?

        • 1. Re: Navigating tabs
          CarlSchwarz

          remove line 7. That probably is refreshing the display. do you have a script trigger on the layout that is running on layout enter?   Otherwise you can create a new window off screen and close it in this script.

          • 2. Re: Navigating tabs
            Menno

            Is there a script-trigger on the biochemical-layout or the field Biochem::_PatientuuID?

            • 3. Re: Navigating tabs
              tays01s

              I've removed line 7; no effect. There aren't script triggers on either biochem layout or Biochem::_PatientuuID but there is a 'stay on panel' trigger on the tabs to prevent the User leaving the Calc tab (the one the User is automatically taken to when the Patient_U layout is opened) if 2 specific fields are empty.

               

              I've tried missing out Go to Patient or original layout and instead going to the portal object, but of course that does not work.

              • 4. Re: Navigating tabs
                SteveMartino
                but there is a 'stay on panel' trigger on the tabs to prevent the User leaving the Calc tab (the one the User is automatically taken to when the Patient_U layout is opened)

                Are your sure this isn't firing a trigger script in Line 6?  Seems like it would.

                • 5. Re: Navigating tabs
                  Menno

                  maybe you should "tweak" the "stay on panel" trigger a bit together with the "create new biochem" script:

                   

                  add two lines to your "biochem" script:

                  line 2.5: Set-Variable ( $$notrigger ; 1 ) and line 9: Set-Variable ( $$notrigger ; "" )

                   

                  Add and exit-script within an if-end at the beginning of your "stay on panel" script with $$notrigger = 1 in the clause.

                   

                  and try again

                  • 6. Re: Navigating tabs
                    philmodjunk

                    There's a different approach that you can use to create your related record that leaves tab panels unchanged and does not trip any script triggers:

                     

                    MagicKey

                     

                    If you websearch MagicKey, you can find some excellent articles on the technique. If you search this forum for an instructional file called:

                     

                    Adventures In FileMaking #2

                     

                    The final example, "Buton Bars as Value Lists" uses this method if you want to see a working example.

                    • 7. Re: Navigating tabs
                      tays01s

                      Tweaking the stay on panel and new Biochem scripts worked fine.

                       

                      Phil: I'll read up on magic keys. It won't be the first time I've later gone back to your suggestion as a strategic improvement.

                      • 8. Re: Navigating tabs
                        beverly

                        good articles about Magic Key:

                        beverly

                        • 9. Re: Navigating tabs
                          tays01s

                          Thanks Beverly,

                          I'll do some reading!