SXI Forum

A place to collect usefull tips, tricks and implementation strategies.

You are not logged in.

#1 21-11-2018 17:18:57

Registered: 20-11-2018
Posts: 148

Rules: LookupTables

2 Requirements need to be completed before a LookupTable will function correctly:

  1. Configuring the rule

  2. Enabling the rule for the required fields.

NOTE: It is strongly recommended that you use an intelligent XML Editor when editing all X-Layer configuration files.

SXI-approved XML Editors include Oxygen (requires paid license) and Microsoft Visual Studio Tools for Applications 2.0 (included in Visual Studio 2010. Also available by installing the package on your machine).

Configuring LookupTables:
  1. In the configuration, after the </Actions> element, create an <sxi:Tables> element (ignore this step if the configuration already contains an <sxi:Tables> element).

  2. Inside the <sxi:Tables> element, create an <sxi:LookUpTables> element. (If you are using Oxygen to edit the config file, the rest of the required fields would have auto-populated). Remember to close the tag with </sxi:LookUpTables>]if your XML Editor has not done so already.

  3. If your XML Editor have not done so already, create the following inside <sxi:LookUpTables>:

<sxi:Table name="">
	<sxi:Mapping from="" to=""/>

  1. <sxi:Table name=""> is the Reference to this particular table mapping. It is advisable to name it according to the type of mapping values it will contain, like "Priority", "Severity", "Urgency", etc.

  2. <sxi:Mapping from="" to="" /> is the meat of the lookup table. It contains the actual values that we want to match (from) and transform (to). Below is an example:

	<sxi:Table name="Priority">
		<sxi:Mapping from="High" to="1"/>
		<sxi:Mapping from="Medium" to="2"/>
		<sxi:Mapping from="Low" to="3"/>
  1. Above we have a Lookup table called "Priority".

  2. If the field against which we are applying the rule contains a value of "High", then we will change it to "1".

  3. The same applies if the field contains a value of "Medium" (will change to "2") and "Low (will change to "3").

Now that the Table is configured, we can apply our lookup rule at Field-level in our Entrypoint.

Enabling the Lookup rule:

Lets take an Example Entrypoint Configuration:

<sxi:EntryPoint name="CreateIncident" source="d_serviceprovider_sd">
		<sxi:Field name="callnum">
		<sxi:Field name="Assigned_Group">
		<sxi:Field name="Name">
		<sxi:Field name="Description">
		<sxi:Field name="ClientPriority">
				<sxi:LookUp default="2">Priority</sxi:LookUp>

Look at the Field called "ClientPriority":

  1. Lets analyze it: <sxi:LookUp default="2"> means that if no match is found after iterating through the Lookup table, we will assign a value of "2" to the output field "Priority".

  2. "Priority" is the name of the Lookup table which we want to check the value of "ClientPriority" against.

NOTE: If we don't configure a default value and no match is found in the lookup table, then the original value will be used as output value.


Board footer

Powered by FluxBB