Creating dynamic data capture fields inIBM® Sterling Business Center

You can create the dynamic data capture fields for the validation with the DataCapture elements in Sterling Business Center by creating a model template based on the input template attributes associated with the new validation ID. If the new validation ID has the DataCapture element associated with it, then, the model template should be updated to have the DataCaptureName attribute in the corresponding attribute definition element and the value of the DataCaptureName attribute should be equal to name provided in the DataCapture element.

The scenario explained in the below example considers the DataCapture element provided for the Return Window validation ID.

<DataCapture>
    <Attribute DataType="String" Name="CustomerLevelAttribute"/>
    <Attribute DataType="String" Name="ReturnWindowAttributePath"/>
</DataCapture>

The model template may have the predefined greex xml function as follows: fn: equals (/OrderLine/Order/Customer/@CustomerLevel, /OrderLine/DataCapture/@CustomerLevelAttribute)

In the model template, we can have a attribute definition as follows:

<Attribute Name="CustomerLevel" DataCaptureName="CustomerLevelAttribute" DisplayName="b_CustomerLevel"
					XPath="OrderLine/Order/Customer" DefaultQueryType="EQUALS">
					<QueryTypes>
						<QueryType QueryType="EQUALS" QueryTypeDesc="b_approval_is">
							<GreexFunction Name="equals" />
							<Configuration ActionURL="/sbc/systemadmin/getCustomerLevel.do">
								<UIControlConfiguration xtype="xapprovalcombocontrol"
									displayField="CodeShortDescription" valueField="CodeValue"
									optionsBinding="CommonCodeList/CommonCode" />
							</Configuration>
						</QueryType>
					</QueryTypes>

Conventions for adding the bundle key entries

It is recommended that the label for the DataCapture attribute name should follow the convention of - DataCapture+<DataCaptureAtrributeName>. For example, the Datacapture element for MANUAL_PRICE_OVERRIDE validation ID is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<DataCapture>
    <Attribute DataType="Double" Name="MaxOverridePercentage"/>
</DataCapture>

From the above example, the bundle key for the label which captures the value on the Sterling Business Center user interface should be DataCaptureMaxOverridePercentage.

The bundle key that provides a blank text should follow the convention of blktext+DataCaptureAtrributeName. From the above example, the blank text bundle key can be defined as blktextMaxOverridePercentage.