How to configure filter regex to identify patterns

The filter engine in web viewer may identify texts entered into the search field. If the text matches a specified pattern, this text is interpreted as a filter. The user may then apply this filter.

This guide explains how to configure such a pattern recognition.

Step-by-step guide

Follow these steps to configure regex identification of filters.

  1. Locate the profile.config file. Typically it is placed here:
    C:\inetpub\wwwroot\AssertWeb\App_Data\<site>
    The regex may be applied at server level (\AppData\) or site level (\AppData\<site>\).
  2. Configure the search manager. Search Manager may have a set of Triggers which are used to initiate Actions. Follow the sample below.
  3. Restart IIS and test the result.

<RegexSearchTrigger> is used to identify the string entered in the search field. The search-pattern is a regex identifying the text the user enters. If there is a match, the actions in the <Actions> block will be triggered. Note the 'a' and 'b' which are fetched information from the text used in the action in the step below.

<ApplySerialNumberFilterSearchTriggerAction> is used to apply a serial number filter. Note that this action requires parameters fetched from the search-pattern in the RegexSearchTrigger. In the sample above '{a}' is used to fetch the filter group (e.g product) and '{b}' is used to fetch the serial number from the text the user entered.

 

It is possible to add several patterns in the same configuration.


Order is important

Note that the SearchManager may have actions that manipulate the texts the user may have added. A sample of such an action is to remove '.' or other separators commonly used in part numbers.

If filter actions are invoked after such manipulation the filter triggers will operate on the manipulated text.