Example: Linking references to substitutions with rules
You can create data correlation rules to link references to substitutions.
About this task
Create a substitution
rule
for that field, and then insert a Create a reference
rule
as a child of the Create a substitution
rule.Procedure
- Open a data correlation rule set in the rules editor.
A new rule set contains one empty rule pass.
- Create a
Create a substitution
rule. See Creating a substitution with data correlation rules to learn more about creating aCreate a substitution
rule. - Right-click the Create a substitution rule, and then click .
- Right-click the Find data source for substitution rule,
and then click . If the reference
exists, select Find a reference instead of Create
a reference.A
Create a reference
orFind a reference
rule is inserted as a child of theFind data source for substitution
rule. To use the value of the substitution extracted by the parent rule, type %subname% for the Regular expression, where subname is the name of the substitution that is created by the parent rule. See Creating a reference using data correlation rules to learn more about creating aCreate a reference
rule.
Results
Example
datacorrelation
and
sets the substitution name to helpname. Then,
add rules that create a reference as a child of the substitution rule.
The regular expression for the reference rule is docHelpName=%helpname%>.
Thus, the regular expression in the reference rule evaluates to docHelpName=datacorrelation>
.
This regular expression ensures that the correct reference is linked
to the substitution site.