Navigation: Build Your Own ERP >

Data Relations

 

 

 

The system uses ADO.Net dataset in building data relatiionship among tables. You only need to define the relations schema and the system will do the rest for you. Try to google ADO.Net DataRelation to get more details about this topic.

In this sample, we will use FS - Basic app where each account in the Trial Balances (Master) are linked to the Account Listing (Detail)

Step-by-step instructions:

1. Open App Gallery

2. Goto the app FS - Basic on the grid named TableGroup

3. Click Relations tab and enter the relations schema. In this sample two tables named TrialBalance (Master) and AccountListing (Detail) are linked via AccountCode.

4. Click Save when done.

 

Data defition for the Table Relation as follows:

Column Name

Sample Value

Description

GroupId

1. 2113

2. 2113

This is automaticall filled up. The value is taken from the parent table as this is the parent data column key.

OrdinalNo

1. 1

2. 2

The sequence order to be followed by the system when creating the data relation. You must always start with the master or parent table

DataMemberBindingName

1. TrialBalance

2. TrialBalance.AccountListing

The binding name. In the first record, the binding name is simply TrialBalance and no child is set.

In the second relation the name TrialBalance.AccountListing is used to tell the system that AccountListing is a child of the parent table TrialBalance.

RelationName

1. TrialBalance

2/ AccountListing

You can use any relation name. In this sample we use the DatasetTableName of the grid in the TableCollection for simplicity

ParentTagName

1. TrialBalance

2. TrialBalance

The name of the parent table. The name must be the name of the table as defined in the TableCollection under the column DatasetTableName

ParentDataColumnName

1.

2. AccountCode

No Column name for the first record.

The column name of the parent table to be linked to the child table. The two should have the same field type

ChildTagName

1.

2. AccountListing

No child defined for the first record since it is the parent table

The name of the child table. The name must be the name of the table as defined in the TableCollection under the column DatasetTableName

ChildDataColumnName

1.

2. AccountCode

No Column name for the first record since this is the parent table.

The column name of the child table to be linked to the parent table. The two should have the same field type

CreateConstraints

Check

Check to create a constraints to avoid orphan records.

Status

A

A=Active; I=InActive. You can create different relations and set it to Inactive to that the user can change the relations at runtime by click the button DataRelations.

Createdby, DateCreated, Modifiedby, DateModified

 

These columns are called audit trails. Their values are auto-generated. One who created or modified the app. It is assumed that the current user is the one who created or modified the record.

 


 


 

 

 

Copyright © 2021 Terasoft Corporation