We will show an example of preparing two child models "customer" as parent model and "support" "buying".
More than one child can be specified for linking models with foreign keys.Figures 1 and 2 show examples in which the customer model is the parent and two child "purchasing history" "support" models are prepared.
It is arranged in dictionary order of model ID (English).
Figures 3 and 4 show the definition of purchase history model and support model prepared this time.
Specify the type of the item specified as the foreign key with the same type as the type of the referenced item.In this example, "customer ID" is specified as "numeric" type.
In the "Customer ID" item, set the foreign key.
Specify the parent model for "foreign key> model name".
"Referenced item name" is the item on the child model side isSame nameCan be omitted.(This time it is the same "customerid", so you can omit it.)
Child models on the parent model details screen are stored in tabs by default.(Fig. 1, Fig. 2) Child models can be displayed vertically as shown below, not tabs.
Modify the screen definition of the child model.
Uncheck "Screen> Search/list display> External key coordination> Display method> Tab layout".By standard, it is checked.
When multiple child models are linked to one parent model, the display order is "dictionary order of model IDs of child models".Figure 9 is an example of a model ID called ask and support.
You can change this order.
Even if tab layout is not used, this display order is applied.
Specify the "tab display position" of "Screen> Search/list display> Foreign key linkage" with the following format.
Parent Model ID:Position
Link multiple parents to one childWhen settings are made, you can specify them by separating them with a comma as follows.
Parent Model ID:Position,Parent Model ID:Position,...
The position number is counted from "1".