3 Replies Latest reply on Dec 1, 2008 1:36 PM by (George_Jeffries)

    Complete Form Processing

      I have two dynamic forms, FormA and FormB. What is happening is that central is not completely processing FormA before it starts FormB. Central calls Subform5, which is supposed to be on FormA, after it starts processing FormB and it says it cannot find it. If I try to process FormA by itself it works fine. But if I try to process it with multiple forms in one data file it gives me the error "Invalid subform name (Subform5)" and it dies. Is there a way to make sure that it completely processes FormA before it starts FormB? Or am I doing something wrong that it is starting FormB early?

      Some notes: I have tried to use !OnExit to call Subform5 and I have also tried to set it up to trigger Subform5 from a ^Field value. Both of these fail.

      Please let me know if you have a solution to my situation.

      Thank you,
      -Z-
        • 1. Re: Complete Form Processing
          Level 1
          Could you provide a sample of your data stream when using multiple forms.
          • 2. Re: Complete Form Processing
            Level 1
            The following is a sample of the data stream that is used to populate a multi-document "package"

            ^JOB JOBNAME -afxon -apdfmon -zPDF2
            ^FORM FormA -aapoff -afxon
            ^FIELD FIELDName1
            Data
            ^GLOBAL GLOBALName1
            Data
            ^GLOBAL GLOBALName2
            Data
            ^GLOBAL GLOBALName3
            Data
            ^GLOBAL GLOBALName4
            Data
            ^GLOBAL GLOBALName5
            Data
            ^GLOBAL GLOBALName6
            Data
            ^GLOBAL GLOBALName7
            Data
            ^GLOBAL GLOBALName8
            Data
            ^GLOBAL GLOBALName9
            Data
            ^GLOBAL GLOBALName10
            Data
            ^GLOBAL GLOBALName11
            Data
            ^GLOBAL GLOBALName12
            Data
            ^GLOBAL GLOBALName13
            Data
            ^GLOBAL GLOBALName14
            Data
            ^FIELD FIELDName2
            Data
            ^FORM SignatureCardBus -aapoff -afxon
            ^GLOBAL GLOBALName1
            Data
            ^GLOBAL GLOBALName2
            Data
            ^GLOBAL GLOBALName3
            Data
            ^GLOBAL GLOBALName4
            Data
            ^FIELD FIELDName1
            Data
            ^GLOBAL GLOBALName5
            Data
            ^FIELD FIELDName2
            Data
            ^FIELD FIELDName3
            Data
            ^FIELD FIELDName4
            Data
            ^FIELD FIELDName5
            Data
            ^FIELD FIELDName6
            Data
            ^FIELD FIELDName7
            Data
            ^FIELD FIELDName8
            Data
            ^GLOBAL GLOBALName6
            Data
            ^FIELD FIELDName9
            Data
            ^FIELD FIELDName10

            ^GLOBAL GLOBALName7
            Data
            • 3. Re: Complete Form Processing
              Level 1
              Without knowing what your template looks like I can only tell you how I produced your error message.

              What I found was that the message occurred when the data for the second template contained a ^field for a field that did not appear on the second template but did appear on the first. (A ^global will not cause this error.)

              As you may or may not know when merge processes the preamble, if there are two entries for the same definition then merge will process the last one it reads. In this way a script in JFPreamble will "overwrite" the script for the same definition in JFPreamble_1.

              When your data includes a call to a second form (using ^form) then you are in fact adding the preamble script for the second template to the bottom of the script for the first template, thus making one large script. So when merge is processing a ^field entry it will search the WHOLE preamble not just the preamble for the current template.

              In my case there was a field FIELDname2 in the data for the second template that did not appear on that template. But there was a field called FIELDname2 on the first template, so merge used the definition
              associated with that field (because it was the only one in the preamble) and tried to lay down a subform that did not exist on the second template. Thus the error.

              When I added the FIELDname2 to the second template the error disappeared.

              I hope this helps.