2 Replies Latest reply on Jun 1, 2011 10:45 AM by Antony

    Cannot delete portal row when script trigger "onObjectExit" is enabled

    Antony

      Summary

      Cannot delete portal row when script trigger "onObjectExit" is enabled

      Product

      FileMaker Pro

      Version

      11v1

      Operating system version

      XP SP3

      Description of the issue

      Context :
      Table "students" with student ID, name, etc.
      Table "grades" with student ID, class ID, etc. (multiple grades for one student)
      I have a portal in my "student" layout which shows the grades of the student. The portal has row deletion enabled. It works fine this way.

      I have a script step to calculate the cumulative mean of the student. This script is activated by the "OnObjectExit" trigger on the portal. If this trigger is activated, I cannot delete the rows of my portal.

      Steps to reproduce the problem

      I tried deleting the row with a script, didn't work.
      I tried deleting the row manually. FM ask me if I want to delete the related record. If I click "yes", nothing happens (no error message).

      If I disable the "OnObjectExit" trigger step, it works (successful deletion). If I re-enable it, it doesn't work (no  deletion)

      Expected result

      Deletion of the row even if OnObjectExit trigger is active.

      Actual result

      The row is not deleted if OnObjectExit trigger is active.

      Exact text of any error message(s) that appear

      No error message.

      Workaround

      Using the script trigger OnObjectSave instead of OnObjectExit.

        • 1. Re: Cannot delete portal row when script trigger "onObjectExit" is enabled
          philmodjunk

          I cannot reproduce this bug on my WIndows Xp system.

          I added a script that just used show custom dialog to display some text and used the portal's on object exit trigger to perform this script. I could still manually and with a script delete the portal row.

          Deleting the portal row does trigger the on object exit, so if you have a copy of advanced, you might want to enable the script debugger and then try this again while watching the script execute in the debugger to gain a clue as to why you can't delete your portal row.

          • 2. Re: Cannot delete portal row when script trigger "onObjectExit" is enabled
            Antony
            • In fact, the only action contained in my script activated by the script trigger is :
              Go to Field [Select/perform; Etudiant::MoyenneCumulative]. This was done to refresh the value of the calculated field "MoyenneCumulative" which is based on information (grade) contained in a related table (i.e. the portal).
            • I got it to work with using OnObjectSave instead of OnObjectExit.

            Unfortunately, I don't have advanced so I can't use the script debugger...but it works now!