2 Replies Latest reply on Sep 5, 2013 6:41 AM by Fred(CH)

    Set Next Serial Value Script Step and Error #102

    Fred(CH)

      Summary

      Set Next Serial Value Script Step and Error #102

      Product

      FileMaker Pro

      Version

      12.0v4

      Operating system version

      Mac OS X 10.8.4

      Description of the issue

      The "Set Next Serial Value" script step never works when the Specify target field option is not defined. A systematic #102 error is generated in this case.

      Moreover, even the error capture is disabled, even you are invoking the step directly with a button (without script), the enduser is never receiving any error message.

      Steps to reproduce the problem

      STEP 1
      Define a number field with a serial number auto enter option.
      STEP 2
      Define a new script or a button that performs the "Set Next Serial Value" script step WITHOUT specifying the target field. However, define correctly the calculated result.
      STEP 3
      In browse mode, create a new record and activate the concerned number field.
      STEP 4
      While the concerned field is still activated, perform the new script.

      Expected result

      If the Specify target field option is not checked, i expect that the script step is applying to the active field during execution, as it works for ALL others Field script steps.

      And if it don't, and Error capture is off, i am at least expecting that an error is sended to the enduser.

      Actual result

      If the Specify target field option is not checked, the step is always generating a #102 Error "Field missing", even the active field is numeric and have a serial number auto enter option defined.

      Moreover, even Error capture is off, enduser is not receiving any error message.

      Exact text of any error message(s) that appear

      none

      Configuration information

      all

      Workaround

      You must ALWAYS specify the target field. But thus, you cannot define any GENERIC script and you  must duplicate your script for EACH concerned Field.

        • 1. Re: Set Next Serial Value Script Step and Error #102
          philmodjunk

               Sorry Fred, but like Set FIeld and many other script steps, Set Next Serial Value was never intended for indirect reference. This is "as Designed" (I am predicting the official response). And many, many script steps do not interrupt a script with an error message when they generate an error code. This is not how I would prefer it (silent fails) either, but it's what we have to work with at the moment.

               I've suggested previously via the feature request form that FileMaker needs to review and update their script error handling so that:

                 
          1.           Error codes are not generated when there is no functional error condition such as go to record [next ; exit after last]
          2.      
          3.           All errors interrupt the script with a message and with identical options in all cases.
          4.      
          5.           All error messages then should be supressable via Set Error Capture [on]
          6.      
          7.           A script trigger, OnScriptError (ScriptName ) with a ResumeNext option should be added so that we can add a generic error handler script instead of testing for error codes after each and every script step that might possibly generate an error.

                

               None of this is the case with the current version of FileMaker. sad

          • 2. Re: Set Next Serial Value Script Step and Error #102
            Fred(CH)

                 Thank you Phil.

                 I can perfectly understand your answer (and probable FMI answer).

                 But maybe, i was perturbated by the check box of the script step option than generally suggest that it is a choice, and the fact you can leave it empty, expecting a possible execution as is.

                 Bye, Fred