2 Replies Latest reply on Aug 28, 2020 8:40 AM by bmarzolf

    Can I reuse rules on multiple actions?

    bmarzolf Lurker

      I find myself frequently creating a series of actions that work together, and all need the same set of rules applied to them. Is there a way to wrap the actions so that one rule list will apply to all the actions?

       

      I tried applying the <rulesList> to an <actionList> but that isn't allowed.

        • 1. Re: Can I reuse rules on multiple actions?
          michiel_dhont Hot Shot

          Hi,

           

          You can bundle those actions to an <actionGroup>. For example:

           

            <postShowPageActionList>


             <actionGroup>
              <actionList>
               <setInstallerVariable>
                <name>project.component(premiumComponent).selected</name>
                <value>0</value>
               </setInstallerVariable>
               <setInstallerVariable>
                <name>project.component(premiumComponent).canBeEdited</name>
                <value>0</value>
               </setInstallerVariable>
              </actionList>

                 ...

              <ruleList>
               <compareText>
               <text>${licenseKey}</text>
               <logic>equals</logic>
               <value></value>
               </compareText>
              </ruleList>
             ...

          </actionGroup>

           

          In that way you can apply the same rules on various actions.

           

          Another possibility is to create a custom rule. In that way you can easily apply the same combination of rules throughout your project:

           

          You can find more information about creating custom rules in the following section of our manual:

           

          https://clients.bitrock.com/installbuilder/docs/installbuilder-userguide.html#snip3465738

           

          Best regards,

          Michiel

          • 2. Re: Can I reuse rules on multiple actions?
            bmarzolf Lurker

            Thank you so much! This is exactly what I needed!