Support > Repository > Referencing other models > Reference linkage
ja | en

You can refer to other relevant items automatically at the timing of model reference. Wagby calls this "reference interlocking".

Example of operation

I will explain with "customer model" and "support model" as an example.When referring to "customer name" in the support model, the latest "customer company name" related to it is displayed at the same time.This method eliminates the trouble of inputting duplicate data, and can always refer to the latest data.

Figure 1 Automatically refer to related items

The new registration screen of the support model with reference linkage set in Fig. 2 is introduced.
You confirm the customer name from "Search ..." button.(For details, see "Reference to reference model> Search screenI explain it on the page of.)

Figure 2 Support new registration screen

When you confirm the customer name, the company name is automatically set.The company name item is defined as reference linked type.

Figure 3 Company Name is Automatically Set When Confirming Customer (Reference Linking)

Definition method

The support model is defined as shown in Figure 4.

Figure 4 Definition of support model

The "customer name" item refers to the customer model.

Figure 5 Defining customer name fields

The "customer company name"Refer to the same customer modeldoing.When the item name "customer name" to be linked is decided, the referenced model item name "company name" is determined.

Figure 6 Defining the customer company name as reference linkage
In this way, Wagby's model can include not only "information held in the database" but also "information displayed on the screen".

Relationship with database

Reference linkage items are not stored in the database as standard.(No columns are generated in the table, too.)

When you set reference linkage, the database save setting is automatically canceled.At the display timing, the latest value is acquired from the database.

(It can also be set to save.Detail is"Save reference linked item to own model"Save the reference linkage item to the reference modelPlease read.)

When referring to Figure 7, setting the linkage automatically releases the database save setting

Automatically become read-only

Reference linkage item automatically becomes "read only".

When you select the linked item referring to Figure 8, read-only setting is done automatically

Search behavior

Even if the reference interlocks are daisy chains, you can search.

Reference linkage> Reference linkage> Reference linkage> String type field
Reference linkage> Reference linkage> Model reference (search screen)

You can search patterns such as.

When the referenced item is a text area

If the referenced item is a character string type (text area), if this is referred to and linked, it becomes as follows.

  • In the Register/Update/Details/List screen, it is displayed in the text area (read only).
  • Reference linkageFormerBy setting "Output control> Text area> Display by label" is enabled, you can make a setting that it will not be a text area on the detail screen.

Design considerations

When the referring source item (customer name of the support model in the above example) is "DB not saved", the reference linkage will not work.

The following settings can not be made to the reference linked type item.

  • The reference source item (the customer company name of the support model in the above example) is the repetition item.
  • The referring source item is a repeating container, and the reference destination item (the customer company name of the customer model in the above example) is a repeating item.
  • The reference destination item (customer company name of the customer model in the above example) is in the repeating container.
  • Specify data specification items (customer name of support model in the above example) other than the following.
    • Item type is "item reference (list box) of reference model"
    • If the type of the item is "item reference (radio button) of reference model"
    • If the type of the item is "item reference (search screen) of the referenced model"
    • Foreign key item
Refer to Figure 9 Items that can be specified as interlocking and items that can not be specified

You can also set to save the reference linkage item in the database.

Example of operation

Fig. 10 shows an example in which the reference interlocking item "customer company name" can be stored in the support model.You can correct and save reference linked values.

Correct and save the linked item referring to Figure 10

Definition method

Open the detail definition dialog of the "customer company name" item of the support model.In "Detailed database details", "Save value in database" is valid.In addition, the storage model of the reference model is "own model".

Refer to Figure 11 Settings to save the values ​​of linked items in the database

Also, cancel the read only setting so that it can be input.

Figure 12 Canceling the read-only setting

Relationship with database

The value after saving is managed separately from the customer company name of the customer model.After that, even if customer model changes occur, it will not be reflected on the support model side.
Fig. 13 Image of own model storage

Example of operation

Figure 14 shows an example where the reference interlocking item "customer company name" can be saved in the support model.The modified value is reflected in the "customer" model to which reference is made.

See Figure 14 Correct and save the linked items

The customer model (referenced) has been modified.

Figure 15 Items of the referenced model have been modified

Definition method

Open the detail definition dialog of the "customer company name" item of the support model.In "Detailed database details", "Save value in database" is valid.In addition, the reference model storage location is referred to as "reference destination model".

See Fig. 16 Setting to save the value of linked item in database (reference model)

Also, cancel the read only setting so that it can be input.

Fig. 17 Canceling the read-only setting

Relationship with database

This setting is handled as "transaction".Multiple models are updated and committed to the database.
See Figure 18 Image of the stored model

The input filter of the reference interlocking own model (or other model) saved items is the following rule.

Leave the filter specification blank Specify filter
The same filter as the referenced item is used. The specified filter is used.
For versions prior to R7.10, the same filter as the referenced item is always used.(Even if you specify a filter, it is ignored.)

Example of operation

You can display the reference linkage value in the search condition.It will not function as a search item, so it will be positioned for confirmation.

Figure 19 Displaying the reference linkage value in the search condition

Definition method

The entire support model definition is shown in Figure 20."Customer name" and "Company name" refer to the customer model and "Company name" is the reference linkage item, and the search condition is validated.

Figure 20 Definition of support model

For "Company name" item, enable "Search control> Read only".

Figure 21 Read-only setting

Restriction

This function does not apply to the next search screen.

  • Calendar view
  • CSV/Excel download

[Application] Implementation of input method by selecting and adding fixed messagesPlease read.