3 Replies Latest reply on Nov 8, 2019 9:16 PM by 3255688

    Multiple triggers on a section


      Documaker junkies ....


      I believe that if I add two triggers to a section, it treats it as an AND condition (both triggers must resolve to true in order to fire it).


      Is there a way to have them behave as an OR condition (either trigger can resolve to true in order for the section to fire)?




        • 1. Re: Multiple triggers on a section

          I took the reference implementation extract extrfile_1.xml and added this to a test scenario. In the default reference implementation, it will generate the AM-GBL form as it has an ALWAYS trigger on it. I created a new trigger called NEVER, which does a RETURN(0);, and added it to the AM-GBL form. I ran the test, and the form triggered. In a truth table, (T AND F) = F, whereas (T OR F) = T. In this case, we have T OR F = T, therefore, when multiple triggers are specified on a resource, the system creates an OR condition.


          If you want to create an AND condition, you can create a new trigger that combines all the possible logic combinations to generate your result. This is usually the accepted best practice.



          • 2. Re: Multiple triggers on a section
            Mr Peabody-Oracle

            Andy is correct and it gets even more complicated if you mix in a trigger that returns a count versus simple True/False. I too recommend that you combine your conditions into a single trigger - or make a new trigger that calls the two current triggers that you intend to mix together in an AND or OR situation.

            • 3. Re: Multiple triggers on a section

              We noticed a different behavior. We return Always (REturn 1) and Never as Return 0.


              The overall result we got was that section printed according to the last trigger that's executed. So, if  I have trigger executed in order 1,0 section is not printed. When the triggers execute in order 0,1 prints the section.


              We are on 12.6 now. I remember in 11.4 or 12.1 to behave those as OR condition, does anyone know if its a bug in 12.6 or the intentional design change.