Toolbox Rule

Last Updated: 07/15/2016 Introduced in Verision: 2.0

This tutorial demonstrates how to filter Categories and Subcategories in the Designers’ Toolbox. In order to accomplish this we need to create a specific Toolbox Rule that can filter Toolbox Categories in the desirable Designer.

Example:

In this example we are going to create a Toolbox Rule for the Report Designer. With this Rule enabled we should only see Categories that start with “C” and Subcategories that start with “Account” in the Report Designer’s Toolbox.

If we look at the Toolbox in the Report Designer, it contains numbers of Categories and Subcategories by default…

 reportToolBoxOriginal

In order for the Administrator to see changes when Toolbox Rule applied we need to make sure that Disable Filtering For Administrators setting is unchecked. We navigate to Settings > Designer Settings in Portal

 designerSettings

In Edit Designer Settings window we locate All Designers category and uncheck Disable Filtering For Administrators checkbox. Then, click Ok to save and close Designer Settings window.

 disableFiltering

To create a Toolbox Rule we navigate to Designers > Toolbox Customization > Element Rules in Portal.

 toolboxCustomizationFolder

Then, we click Add Toolbox Rule button on the Folder Actions Panel.

 addToolBoxRule

In the resulting pop-up window we name our Rule and click Ok to proceed to the Rule Designer.

 nameRule

In the Rule Designer we can Enable or Disable our Toolbox Rule by checking or unchecking Enable checkbox in Settings category.

 ruleEnabled

In the Start Rule wizard on the workspace we click Add New Rule Step button.

 addFirstRuleStep

First, we need to create a Phrase for this Rule that defines which Designer we want to use this Rule for. Therefore, we pick type and click Next.

 pickType

In the resulting Verb definition window we expand Equals category, select Is verb, and click Next.

 typeIs

Finally, we select Report Constant Value for this Rule Phrase and click Done.

 typeIsReport

Next, we Add Either/Or Group condition for our Rule.

 addEitherOrGroup

Then, we Add Condition for the Either part of Either/Or Group in the Rule.

 addEitherCondition

In the Phrase builder we pick isCategory variable and click Next.

 pickIsCategoryEither

In the Verb definition window we expand Logic category and select Is True. Then, click Done to complete the Phrase.

 isTrueIsCategory

In the similar manner we Add Condition for the or part of Either/Or Group in the Rule.

 addOrCondition

Again, we select isCategory variable in the Phrase builder, and click Next.

 pickIsCategorySecond

In the Verb definition window we expand Logic category, and select Is False verb this time. Click Done to finish the Phrase.

 isCategoryIsFalse

The main logic for our Toolbox Rule is defined. The Rule will work only in the Report Designer. Then, the Rule will filter Categories (isCategory Is True) and Subcategories (isCategory Is False). But this Rule will not apply any filtering for Categories and Subcategories at this point. We Add another Condition for the Either part of Either/Or Group in our Rule.

 addConditionForIsTrue

This time we need to create a condition for Categories’ name. In the Phrase builder we select name variable and click Next.

 firstAndName

In the Verb definition window we expand Text Rules category and select Starts With. Because this Rule will Filter Out everything on True outcome, and we want to keep all Categories that start with “C”, we check Not checkbox to evaluate the Rule with opposite results. Then, we click Next.

 firstAndNameNotStartsWith

In the resulting window we input “c” as a Constant Value for this Rule Phrase. Click Done to complete the Phrase.

 notStartsWithC

Similarly, we Add second Condition for the or part of Either/Or Group in our Rule.

 addSecondConditionForOr

We select name variable in the Phrase builder again, and click Next.

 secondNamePick

In the Verb definition window we select Starts With from Text Rules category and check Not checkbox. Then, we click Next.

 secondNotStartsWith

Finally, we type “account” in the Value textbox for this Rule Phrase. Click Done to complete the Phrase.

 constantAccount

This completes our Toolbox Rule. It should look as following…

 ruleCompleted

If we open Report Designer and expand Data Sources in the Toolbox, we can confirm that there are only Categories that start with “C”. We expand Common Category and validate that only Subcategories that start with “Account” are available for us.

toolboxFiltered

Additional Resources