4 Replies Latest reply on Feb 2, 2010 11:20 AM by Steve Wright

    Commit Portal record in a script

    donjuancarlos_1

      Title

      Commit Portal record in a script

      Post

      I know I can click out of a portal to commit a portal record, but I can't seem to commit the record while in a script.  I need to do this because I have script triggers attached to portal fields that update totals as I enter info. How do I do this (and I can't lose my sopt in the portal)?

        • 1. Re: Commit Portal record in a script
          mrvodka
             Did you try Commit Record [] ?  I am not sure I understand what your issue is in the script.
          • 2. Re: Commit Portal record in a script
            donjuancarlos_1
              

            When I commit the record, I lose focus on the portal.  I want to commit the record and still stay on the same line and field in the portal.

             

            Edit:

             

            Let me expand on that, because it's more than that.  I cannot use the last line of a portal in a calculation (For example, in a time card entry screen, I have a box off to the side of the portal that calculates the total hours worked by a person on a particular day.) until I exit the portal (and not with a script, but with the mouse), even if I use the Commit Records script step. There should be a way for me to do this.  I am using FM10 Adv on Windows XP

            • 3. Re: Commit Portal record in a script
              TSGal

              donjuancarlos:

               

              Thank you for your posts.

               

              If your "box off to the side of the portal" calculates the total hours, then I assume that box calls a script.  Since your record is now committed, the last portal row is now accessible.  Therefore, go to the last portal row and execute the script that is attached to the box.  For example,

               

              Go to Portal Row [ Last ]

              Perform Script [ <script that performs the same as the box> ]

               

              TSGal

              FileMaker, Inc. 

              • 4. Re: Commit Portal record in a script
                Steve Wright
                  

                Are you using the separation model by any chance ?  Im just wondering why the total hours worked field is not updating.

                 

                I have an invoice layout, where items are entered in a portal, the totals (not on a portal) all update without using a commit step, or exiting the portal.

                However using the separation model requires some trickery to re-evaluate the calculations.