RuleID
:RuleID("ID")
This command is optional.
When you create a rule, you can assign an ID to that rule by using this command. The ID is
specified by appending :RuleID("ID")
, where "ID" is an alphanumeric
identifier you give the rule. If you do not assign an identifier to the rule,
Spectrum Technology Platform will generate a numeric ID for the rule. If multiple
rules exist, they will be numbered sequentially, based on run order ("1", "2", "3",
and so on).
For example:
%IgnoreCase;
%InputField("Name");
%OutputFields("FirstName", "LastName", "FirstName2", "LastName");
<root>=<FirstName><LastName> :RuleID("Name") |
<FirstName> '&' <FirstName2> <LastName> :RuleID("CompoundName");
<FirstName>=@Table("Given Names");
<FirstName2>=@Table("Given Names");
<LastName>=@Table("Family Names");
In the example above, the root rule contains two rules. The first one, with RuleID "Name",
matches FirstName and LastName: <FirstName><LastName>
:RuleID("Name")
The second rule, with RuleID "CompoundName", matches FirstName and LastName but also includes
FirstName2: <FirstName> '&' <FirstName2> <LastName>
:RuleID("CompoundName")
The output of these rules would look similar to the following:
%IgnoreCase;
%InputField("Name");
%OutputFields("FirstName", "LastName", "FirstName2", "LastName");
<root>=<FirstName><LastName> |
<FirstName> '&' <FirstName2> <LastName> ;
<FirstName>=@Table("Given Names");
<FirstName2>=@Table("Given Names");
<LastName>=@Table("Family Names");
The output of these rules would look similar to the following:
To use this command:
- Position the cursor where you want the command inserted.
- Double-click :RuleID in the Commands list.
- Type an alphanumeric value in the text box.
- Click OK.