5.1 Create Data block
This topic provides the systematic instructions to create data block.
- Right-click on the Data Block and select Add option to create the data block.
- Or click the Add (+) icon in the top left of the data
block screen to create new data block.Add Block window displays.
- Specify the Block Name and then click the
OK button.The Block Name has to adhere to the following conventions:
- It has to start with BLK_.
- Block Name should not contain the table names which will be attached to the block. This is of high importance from the security point of view as Block Name will be exposed in request and response XML.
For example: if the data source name is FTTB_CONTRACT_MASTER, the block name can be BLK_MASTER; but not BLK_FTTB_CONTRACT_MASTER.Block Properties screen displays.Figure 5-3 Block Properties
- Specify the Block Properties as follow:
Table 5-1 Block Properties
Field Desription Block Name This field will have defaulted with the block name which is added. It is a non-editable field. Block Title Select the title of the block from the list of labels. If a new label needs to be created, then create and select from the list. For multi-record blocks, the block title will be displayed in the screen preview superseding the field set title. For single record blocks, block titles are not of any significance and hence need not be provided. Parent Select the parent block from the select list. All the data blocks will be available in the Select list. All data blocks except the master data block need to have a parent data block. XSD Node This field captures the XSD node name. ODT will use this name for the generation of the node in XSD's. This field will be defaulted based on Block Name (by removing BLK_ and replacing _ with -). If the developer wants, XSD Node field can be modified.. XSD Annotation This field captures the annotation for the XSD node specified. Description of Block title label will have defaulted as Annotation which can be modified by the developer. Multi Record Using this field developer can decide block type, whether the block is a single entry block or multiple entry blocks. Depending on this value, the field Data sources available will be populated. If the value is Yes the field Data source available will be populated with data sources that have flag Multi record Yes and vice versa. If the relation type is provided as one-to-one, multi-record has to be Yes and vice versa. Block Pk fields Primary key fields of the block have to be provided here. If more than one field forms the primary key, it has to be separated by ~. This data is used for building the change log of a screen. Relation Type The relation type with the parent data block has to be mentioned here. It can be One To One or One To Many. Master Block One master block is mandatory while designing the screen and using this flag you can define a block as master. Block Type The type of the block can be selected depending on the requirement, below are the description of each type: - Control: If the block is used only for UI purpose, and it is not required for processing in the backend, then the block can identified as Control type. Only control fields can be added to the Control block.
- Normal: This block will be used for normal processing. Request and response XML will contain this data block information.
- Summary: Block which is used for creating the summary screen. For normal request XML, this block won’t be present in the request or response XML.
- Refer data block properties image.
Data Sources available Depending on the Multi Record flag, data sources will be populated. Then the required data sources can be attached to the block. Validations for populating the data source: - Multi Record: Yes, All the data sources which have Multi Record flag YES and Relation Type One To One.
- Multi Record: No, All the data sources which have Multi Record No.
While attaching Data Sources to Blocks, multiple data sources should be selected only if such data Sources can be functionally clubbed.
For Example: CSTM_PRODUCT and LCTM_PRODUCT_DEFINITION. Clubbing should not be arbitrary. A single entry data source can be mapped to more than one data block while a multi-record data source can be attached to only a single data block.
Data Sources Added This list shows the data sources which can be attached to the particular data block. The data source shown depends on the value of the multi-record field. From the available data sources, the developer can add data sources he wants to be part of this data block.
Those will come under the list Data source Added. He can also remove them from the data block. The buttons with arrow symbol are used for this addition and removal.
Note that one data source can be attached to more than one data block, but each data source column can be mapped to a single data block field. Data Sources added in one release would not be allowed to be removed in any future releases.
Refer Attaching Data Source to a Data Block image.
Figure 5-5 Attaching Data Source to a Data Block
Parent topic: Data Blocks