3 Replies Latest reply on Mar 9, 2009 11:39 AM by TSGal

    Problems with Commit[ment]

    ChuckPelto

      Summary

      Problems with Commit[ment]

      Description of the issue

      TO: WhomeverRE: FMP10a Has Difficulty with Commit[ment]  FileMaker Product(s) involved: FMP10aOperating System(s) involved: Mac OS X 10.5.6Detailed description of the issue: Commit does not 'commit' records, i.e., exit, when used in a script that is called on by the new Script Trigger functionality and involves changes in a Custom Function field.Exact steps to reproduce the issue:[1] Create a field that uses Script Trigger to call upon a ScriptMaker script when data in a pop-up menu field is changed.[2] Have a custome function field triggered by a change in the pop-up menu field of that same table.[3] In the ScriptMaker script, put a Commit call as the last item.[4] In a related table create a field that is supposed to be modified based on values in the first table's pop-up menu field, when it changes.[5] Go into browse mode and change the value in the pop-up menu.Expected Result: That the record will be exited by the Commit call.Actual Result: The record is not exited by the commit call. Fields are still in dotted outilne. The data in the related table record that depends on the value in the pop-up menu field and custom function does not change.Exact text of any error message(s) that appeared: None.Any additional configuration information/troubleshooting that is relevant to the issue:Might be something to do with the call to a custom function that does a complex calc which populates another field in the pop-up menu field's table, based on what changes in the pop-up menu. It seems to be a possibility.The pop-up menu activates a calc field in the same table to go after a custom function. The custom function returns information based on the value selected in the pop-up menu. That information is used by the second table to update records within itself.But no action is taken until I physically click on a blank area, i.e., someplace without a field, in the record where the pop-up menu has been changed.I've run a test and if I use the Commit function in a script that is activated by the Script Trigger function and the Custom Function field is NOT called upon or modified, the Commit function acts as advertised. The record is exited.Any workarounds that you have found: Nothing yet......working on it.

        • 1. Re: Problems with Commit[ment]
          TSGal

          Chuck Pelto:

           

          Thank you for your post.

           

          Unfortunately, I cannot reproduce the error.  Here are the steps I took.

           

          1. I created a new database TEST.fp7, and added the following field:

           

          popup (Text)

           

          2. I created a value list for "popup" with the values "TSGal", "Chuck Pelto".

           

          3. I formatted the field "popup" on the layout to be a pop-up menu. 

           

          4. I created a custom function called "Name" with the parameter "text" to simply display:

           

          text & " is my name"

           

          5. I created a new calculation field "Display", resulting in text, with the formula:

           

          Name (popup)

           

          6. I created a new table "NAME" with the following fields:

           

          Name (Text)

          City (Text)

           

          7. I entered two records into NAME as follows:

           

          Name - City

          TSGal - Santa Clara

          Chuck Pelto - Not Santa Clara

           

          8. I created a relationship between TEST and NAME where TEST:: popup = NAME::Name

           

          9. I created a script (New Script) with the following steps:

           

          Go to Layout [ original layout ]

          Commit Records/Request [ No dialog ]

           

          10. In the layout, I attached a script trigger to the field "popup" as:

           

          OnObjectSave = "New Script"

           

          11. I added a portal into NAME only displaying City.

           

          12. I went into Browse Mode, and changed popup (which was null) to "TSGal".  Display shows "TSGal is my name" and the portal shows "Santa Clara".

           

          13. Noticing there aren't many fields, I created two more text fields:  Field1 and Field2.

           

          14. Returning to Browse, I put my cursor in Field1, and then change the popup from "TSGal" to "Chuck Pelto".  Display shows "Chuck Pelto is my name", the portal shows "Not Santa Clara", and no fields are highlighted.  The record is committed.

           

          ------

           

          Please let me know what I am doing different from you.  Also, if you think it may help, I have sent you a private message (top of this screen - right side - X Messages) with instructions where to send your database file for me to test.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Problems with Commit[ment]
            ChuckPelto
              

            TO: TSGal

            RE: I Think....

             

            ....I've found the problem.

             

            It is ONLY a problem that Commit in a ScriptMaker script will NOT 'commit' records if the Script Triggering field is configured as a DROP-DOWN LIST. If it's a button or a Script Triggered pop-up menu, the commit call in the script works fine. But when it is  a drop down list, it refuses to commit the record, you have to click on a neutral part of the record in order for the record to be 'committed'.

             

            Might want to look into that.

             

            Regards,

             

            Chuck Pelto

            • 3. Re: Problems with Commit[ment]
              TSGal

              Chuck Pelto:

               

              I just tried the same steps above using a drop-down list (instead of a pop-up) and changing the script trigger to OnObjectModify, and the script is definitely committing the record.  I tried it with OnObjectSave, and I'm assuming this is where the problem lies.  The script does fire, but the committing of the record does not take place.  I will forward the information to our Development and Software Quality Assurance (Testing) departments for review.

               

              TSGal

              FileMaker, Inc.