The ILLiad Borrowing DLL has the ability to interact with third-party tables that exist in the ILLiad database. There are some database requirements that must be met in order for this to work properly.
Third-Party Table Requirements
In order to interact with the ILLiad DLL, third party tables in the database should adhere to the following requirements:
- Each third-party table must have a transaction number field. Preferably the primary key, the transaction number field will link to an ILLiad transaction number.
- The transaction number must be unique in the table. You are allowed only one row in your third-party table for each transaction number, which means that you can only store a row with a particular transaction number once. (TransactionNumber in the third-party table cannot be a one-to-many relationship with the Transactions table).
- All other fields in the table must be set to Allow Null or have a default value.
HTML Web Page Formatting
Third-party database fields are entered into the web pages a bit differently than fields from the ILLiad database tables. The third-party table values referenced in the HTML pages and the WebValidation table are set in the format TableName.FieldName.
DatabaseTableField Tag
To pull values from a third-party database field, enter a DatabaseTableField tag into your HTML web pages in the following format:
<#DataBaseTableField table="TableName" field="FieldName">
As shown above, the DatabaseField tag has two parameters:
- table: the table containing the field you want to retrieve
- field: the actual value you want to display
The DatabaseTableField tag replaces the PARAM tag used when pulling values from ILLiad database tables.
For example, if you have a third-party database table named RequestPurchase and the field you are pulling values from is called Vendor, the DatabaseTableField tag would be formatted as:
<#DataBaseTableField table="RequestPurchase" field="Vendor">
Inserting or Updating Values
If you'd like the DLL to insert or update a value in your table, make sure the input name is set to TableName.FieldName where TableName is your third-party table and FieldName is the field within that table.
For example, the input name for the table RequestPurchase and field Vendor is RequestPurchase.Vendor. This same format should be used for the input id and ERRORname values.
<input id="RequestPurchase.Vendor" name ="RequestPurchase.Vendor">
<spanclass="<#ERROR name="ERRORRequestPurchase.Vendor">
An Example Third-Party HTML Entry
We want to create a Vendor field on our LoanRequest.html page. The follow HTML web entry illustrates the format using the instructions given above.
<h2>Request for Purchase</h2>
<label for="RequestPurchase.Vendor">
<span class="field">
<span class="<#ERROR name="ERRORRequestPurchase.Vendor">">
<b>Book Vendor</b></span>
</span>
<input id="RequestPurchase.Vendor" name="RequestPurchase.Vendor"
type="text" size="40" class="f-name" tabindex="50" value=
"<#DatabaseTableField table="RequestPurchase" field="vendor">"><br />
</label>
While you cannot update values in existing ILLiad database tables you are allowed to pull in information from these tables. Use the DatabaseTableField tag where "table" is the ILLiad table you want to retrieve information from and "field" is the ILLiad field you are pulling the value from. An example would look like this:
<#DatabaseTableField table="invoices" field="ItemAmount" />
Third-Party Tables and Web Validation
You can also add your third-party tables to the WebValidation table. Use the following formats:
- Fieldname: must match the input name on the HTML web page. For example, RequestPurchase.Vendor
- Error Tag: must be set to the format used in the web page ERROR name. For example, ERRORRequestPurchase.Vendor