RuleSets
A RuleSet provides a way of expanding the initial search result-set to a larger set of records by specifying which pointers (including reverse pointers) and relationships to follow, and adding any related records.
A RuleSet comprises one or more rules. A rule, in turn, can comprise several steps out from the initial result-set.
For instance, a RuleSet building on a search that retrieved a set of menus might add a number of recipes referenced by the menu which in turn might add a number of ingredients referenced by the recipe; however, this rule will not add the restaurants which reference the menus or the chefs referenced by the recipes as their creator. These would each be a separate rule starting from the initial set of menus (Menus << Restaurants and Menus >> Recipes >> Creators).
You can save multiple RuleSets to the Saved Filters Pane (stored in folders if required). RuleSets are indicated by the RulesSet icon:
Note. RuleSets are also saved as part of the saved filter when the search is saved after applying a RuleSet.
You can apply a saved RuleSet to any set of records retrieved by a search. Each rule (comprising one or more steps) in the RuleSet is applied to the results presented after the previous RuleSet was applied.
Note. When a RuleSet is applied, it operates on the initial result-set resulting from the search query, replacing the results of the previous RuleSet; they are not additive. If you need to apply several rules to build the set of records you require, they should all be defined in one RuleSet.
The RuleSet Editor
To start building a Ruleset, select New RuleSet from the Saved Filters Pane context menu (under the relevant Workgroup):
On the RuleSet Editor screen, click New RuleSet.
You build a rule by adding a series of steps; a step is made up of the following fields:
- Starting Point. The initial record to search on.
- Relationship Field. The set of related records to add to the search results. Reverse pointers are indicated by <<.
- Relationship Type. The relationship type (based on entity type). For reverse relationship pointers, you can select which record type to use.
- Target Entity Type. The record entity being pointed to.
- Optional Filter Query. Use this field to add any additional (and optional) code.
When complete, click Add Step 1. Build any additional steps for this rule. To remove a step (and any sub-steps), click the delete icon (X) for that step.
To add additional rules to the RuleSet, click Add New Rule, and complete as above for each new rule.
When you have completed the RuleSet, click Save RuleSet. You can now set the properties for the RuleSet in the Edit RuleSet dialog.
The Edit RuleSet Dialog
These editable fields are:
- Filter name. Enter a name for the RuleSet filter, which will identify the RuleSet in the Saved Filters Pane.
- Exclude filter results. Select to exclude all but the expanded results.
- Expansion rules. The filter expression (derived from your rules). Use the edit icon to edit this if required.
- Notes. Any additional information about this RuleSet (available to workgroup members only).
- Get filter + rules as string. Copies the current filter expression and RuleSet to a string for reuse.
When you save the RuleSet, it will appear under the selected workgroup folder on the Saved Filters Pane.
Note. To edit a RuleSet, from the RuleSet context menu, select Edit. To remove a RuleSet, select Delete.
Running a RuleSet
To run a RuleSet, first run a search (RuleSets operate only on the current result-set), and select the RuleSet from the Saved Filters Pane. The result-set is expanded based on the first rule, then each subsequent rule in turn.
Note. Applying another RuleSet at this point will reset the original search result-set.
Created with the Personal Edition of HelpNDoc: Generate Kindle eBooks with ease