Administering : Managing business rules and expressions : Business rule definition examples : LinkByText example
  
LinkByText example
In this example, the LinkByText business rule is used to recognize a pattern and set attributes.
The Support Issues module contains a Text attribute called "Mail sent from". This attribute is used to enter the mail ID of the person who sends information about support issues. If the "Mail sent from" attribute contains a pattern, you can use the LinkByText business rule to automatically set the Customer Link attribute.
In the Configuration module, an element is added to match all instances of .*@examplecompany.* to the customer "Example Company Inc." Therefore, when john@examplecompany.com is set in the "Mail sent from" attribute, the Customer link is automatically set to "Example Company Inc."
To use the LinkByText business rule to set up the scenario
1 Add a module by clicking Configure > Modules > Add Module. For the module name, type LinkByText. The module contains the default Element Information attributes and the ID, Title, and Description attributes.
2 Add a Link attribute. For the attribute name, specify Customer and provide a link to the Customers module.
LinkByText module
3 In the LinkByText configuration module, add an element with the following details:
Specify the title Example Company Inc.
For the description, enter .*@examplecompany\.com
In the Customer attribute, link to Example Company Inc.
Set the ID of the Description attribute, which is the regular expression attribute ID, to 651.
Set the ID of the Customer attribute, which is the Link Attribute ID, to 661
4 In the business rules container attribute, enter the business rule. The container attribute must be placed in the target module, which in this example is the Support Issues module. The ID of the target link attribute (the Customer attribute in the Support Issues module) is 676. The ID of the configuration module (the LinkByText module) is 30.
=LinkByText('Mail sent from',"676","30","651","661")
The attribute configuration for the Support Issues module
When an element is created and the "Mail sent from" attribute is set to an address that matches an Example Company Inc. address, the link is set to the "Example Company Inc." attribute. To make other matches, create an element in the configuration module, create a regular expression, and supply a link to be set if a match is made.
Go up to
Business rule definition examples