Adding rules to the ExportDB ruleset

To successfully export line item grid data, you must add rules to the ExportDB ruleset and then add actions to the functions in these rules.

Procedure

  1. In the Datacap Studio Rulesets pane, select the ExportDB ruleset and click Lock/Unlock ruleset for editing.
  2. Right-click the ExportDB ruleset and choose Add Rule. Rename the new rule Export Other Open Database.
  3. Repeat to create three more rules:
    • Export Other Line Item
    • Export Other Total
    • Export Other Close Database
  4. Click the Actions library tab and expand the ExportDB library.
  5. Expand the Export Other Open Database rule and select Function1.
  6. Select and add each of the actions to Function1 by clicking Add to function, and set the action parameters as shown in the table.
    Action Parameter
    ExportOpenConnection @APPVAR(*/exportdb:cs)
    SetTableName Other_Charges
  7. Expand the Export Other Line Item rule and select Function1.
  8. Select and add each of the actions to Function1 by clicking Add to function, and then set the action parameters as shown in the table.
    Action Parameter
    ExportBatchIDToColumn BatchID
    ExportFieldToColumn Date,Charge_Date
    ExportFieldToColumn Category,Category
    ExportFieldToColumn Quantity,Quantity
    ExportFieldToColumn Unit_Cost,Unit_Cost
    ExportFieldToColumn Total,Total
    AddRecord  
  9. Expand the Export Other Total rule and select Function1.
  10. Select and add each of the actions to Function1 by clicking Add to function, and set the action parameters as shown in the table.
    Important: The second action is ExportToColumn.
    Action Parameter
    ExportBatchIDToColumn BatchID
    ExportToColumn Total
    AddRecord  
  11. Expand the Export Other Close Database rule and select Function1.
  12. Select and add the action to Function1 by clicking Add to function.
    Action Parameter
    ExportCloseConnection  
  13. In the Rulesets pane, click Save. Then, click Lock/Unlock ruleset and choose Publish ruleset. The following image shows the finished ruleset:
    Example of the finished ExportDB ruleset