3 Replies Latest reply on Feb 19, 2013 1:30 AM by Mr Peabody-Oracle

    Auto-Triggers and Section-level triggers available when executing GenPrint?

    Gregg M
      Hello experts,

      I have a banner page form executed via BatchBannerBeginForm parameter in FSISYS. I wanted to invoke one of three sections on the form using auto-triggers that evaluate a variable's value, with said variable having been assigned/set during my "BatchBannerBeginScript" DAL. However, when I run the GenPrint, I get all three sections (implying all three triggers came true, which is impossible). I added PRINT_IT's to the top of triggers, and I don't see that info displayed in my output listing, indicating it's not executing those triggers at all.

      I then added a simple/empty section to the form, removed the existing three, and added a "PostImageDAL" section rule to that section, and within that, performed a If-Then-Else that performed the equivalent of those three individual auto-triggers....got nothing. After prefixing that script with a PRINT_IT and also not seeing it show up in my output, i'm wondering whether that functionality is only available in GenData, or if I'm doing something else wrong.


        • 1. Re: Auto-Triggers and Section-level triggers available when executing GenPrint?
          Mr Peabody-Oracle
          I can't speak for anyone else, but I did not exactly follow what you are trying to accomplish, so I will just make some general comments.

          The banner processing you describe only applies to the print - either the PrintFormset rule in GenData or in GenPrint as a separate step. During print is usually a little too late to decide to execute triggers. Is this really something that needs to be controlled by the Banner processing?

          And you mention auto-trigger, but I'm not sure exactly what you mean? Do you mean you have triggers defined on the sections or are you using DAL to call TriggerForm(). The regular triggers only apply when executing a trigger rule - like RunTriggers - during GenData. And TriggerForm() as a DAL function would also only function during GenData - and it would also be trying to add a new form and not executing any triggers on some form that you already have included in the transaction.

          If you are trying to add or remove sections during a print step, you would probably have to use the AddSection() or DELSection() functions in DAL. (Which might still be named ADDImage() or DELImage() in your version of the product.)

          If none of this sounds helpfu, perhaps you can further describe the situation and something else will click.
          • 2. Re: Auto-Triggers and Section-level triggers available when executing GenPrint?
            Gregg M
            Thanks for your response.

            To clarify, we are running GenPrint as a separate step. Based on the type of output, we want to vary the information put onto the Banner page as it instructs our post-print handling team on how to process the output. A user-defined file is read in during GenPrint, and based on the info in that file, we want to include one of three sections on the banner page. We had originally created 3 different DAL scripts, saved to a DAL library, that were used as "auto" triggers (as opposed to manual triggers. You know, where you right-click on a section of a form in the "Sections" window, and click 'Add Trigger', and if you have it there, the drop down list shows you the defined trigges from SETRCPTB.dal?). But as I explained above, that didn't work. Neither did adding a Section rule "PostImageDal" to try to a conditional AddImage to bring in the Section that way.

            Also, if it helps, we are running 11.5 P2.

            • 3. Re: Auto-Triggers and Section-level triggers available when executing GenPrint?
              Mr Peabody-Oracle
              Two things. GenPrint as a separate step would not utilize the AFGJOB at all, so that would explain why a PostTransDAL rule doesn't help. And GenPrint probably isn't loading the standard trigger library by default, so that might explain why you can't call those scripts.
              If you want your script library to be loaded during GenPrint, you might need this INI option.


              Check the spelling if your trigger library name is different. With that, then you can call any of those routines, but they still won't be triggers. You can call them and capture the return value to know whether you want to do the AddImage() to add the section you want.