- Development of Maintenance Form
- Create Data Sources
3 Create Data Sources
This topic provides systematic instructions to create Data Sources.
- Under Function Generation screen, right-click on the DataSource node and select the Add option to create a new Data Source.
- Go to the List Of values to get the list of tables available and select the required table from the list.If the user knows the exact Table Name, the user can specify the name directly.
- Select Master as Yes if the added data source is Master Data Source for the screen.Every function ID should have one master data source.
- Verify Pk Cols and Pk Types fields are populated and if its not entered then specify the Pk Cols and Pk Types fields.Primary Key columns (i.e. Pk Cols ) and Primary Types (i.e. Pk Types) are mandatory. If it is already maintained in user schema in STTB_PK_COLS it will populate automatically otherwise the user needs to enter values without fail. If the user misses Pk Cols and Pk Types package generation will fail.
Note:
Master Data Source cannot have any parent. - Click on the Save icon at the top right of the screen.Data Source Details screen displays with all the details.
- Under the DataSource node, right-click on the added table (STTM_CUSTOMER).Data Source Details screen displays with added table.
Figure 3-3 Data Source Details- Added Table
- Click on the Add option to add fields to the table.Select Fields window displays.
- Select the required fields and click OK.Selected fields will get added to the Data Source Tree.Data Source Field Properties: Only maximum length can be modified by the developer in Data Source Field Properties. Rest will have defaulted from the table definition.
The data model of a single function ID would include multiple tables. All the tables need to add to the function ID. Note the following while adding child data sources.
- To add Child Data Source, follow the below steps:
- In Data Source Details screen, select Multi Record value as Yes if the child data source is Multi record table.Child Data sources should always be associated with a parent. Relation is mandatory between parent and child. While giving relation, the parent data source should come on the left side of the relation.
Figure 3-6 Data Source Details- Child Data Source
Note:
A data source cannot be the parent to itself.- If the data source is designed with relation type as 1: N with its parent, then it should have at least one more Pk Col than its parent (assuming the relationship is based on Pk Cols).
- Master data source needs to have the audit columns if footer template is Maint audit, but those should not be added to data source fields as the system will handle it.
- In Data Source Details screen, select Multi Record value as Yes if the child data source is Multi record table.