Skip to main content



Set Up Data Tables

In this section you will learn how to set up some data that you can use in your rules. We will use "inline" data so that this rule application will still be self contained, and not dependent upon external resources. In real world scenarios, it is common to set up use data that will exist in external resources, most likely a database, but could also be an XML document.

  1. Click on Data in the left-hand navigation panel ri_59.png
  2. Click Add button and select Table -> Inline Table ri_60.png
  3. Rename the table from "InlineTable" to "CustomerTable"
  4. Click the Edit Schema button. Add an entry named "ID" of type integer. Add another entry named "Name" of type text ri_61.png
  5. Use the Add button to create several entries, where ID is a number (i.e. 1, 2, 3, etc) and the Name is a customer name ri_62.png
  6. Create another inline table called "ProductTable"
  7. Use the Edit Schema button again to create three columns. "ID" of type integer, "Name" of the text, and "Price" of type decimal
  8. Use the Add button to create several entries, where ID is a number (i.e. 1, 2, 3, etc), Name is a product name, and Price is a unit price for that product ri_63.png
  9. Go back to your Entities, right click on CustName, select Convert To -> Calculation. Set the expression to TableLookup(CustomerTable, "Name","ID",CustID)
  10. Right click on ProductName, select Convert To -> Calculation. Set the expression to TableLookup(ProductTable,"Name","ID",ProductID)
  11. Right click on UnitPrice, select Convert To -> Calculation. Set the expression to TableLookup(ProductTable,"Price","ID",ProductID)
  12. Save the rule application by clicking the Save button in the Quick Access Toolbar

At this point, your Data in the left-hand navigation pane should look like this: ri_64.png Now, you can move onto the next step, where you will Create Rules