Display the referenced model in a pull-down format. You can select one value.

Example of operation

Prepare the product model as shown in Fig. 1 in advance.

Figure 1 Product model prepared in advance

Figure 2 shows an example screen that selects the value of this product model in the list box. You can select the name of the reference model "product" from the list box.

Figure 2 Operation example of list box

Definition method

In the quotation model shown in Fig. 2, the type of the item item is referred to as "reference item of another model".(Figure 3)

Figure 3 Definition of quotation model

In the detailed setting of the type, the referenced model is "goods", and the item of the reference destination model which is the choice of the list box is "product name". Select "List box" as input type.

Figure 4 Setting to Use List Box

Example of operation

You can specify the initial value of the list box.An example will be explained in which "key holder" is selected in the list box when opening a new registration form for estimate model.

Check the value of the primary key (here, product ID) of the target data.(FIG. 5)

Fig. 5 Check the primary key of the data used as the initial value

When you open the quotation model new registration screen, you can see that the data in Figure 5 is selected as the initial value.(FIG. 6)

Figure 6 Example of screen when initial value is set

Definition method

Specify the primary key of the target data.

Figure 7 Setting the initial value of the new registration screen
The value of the primary key is never changed during system operation.

Changing display order of options in option modelYou can set the same rule as for any model.

Example of operation

Here, we added the item "display order" to the product model.(FIG. 8)

Figure 8 Added display order item

If the list is "descending", the choices are arranged in descending order of the numerical value of the display order.

Figure 9 Sequence of choices changed

Definition method

Define the display order item.Item name, item ID isAnyis.Make the type an integer type.(FIG. 10)

Figure 10 Definition of Display Order Item

In the estimate model, specify "Sort Rule" as the display priority in the option setting and "Display Order" in Figure 10 as the Display Priority Item.(Here, you can specify an item of type integer type arbitrarily.)

Figure 11 Specifying display priority items
If the display order value is not set (blank), it is interpreted as 0.

More on sorting rules

Display priority
Specify the item specified in "Display priority item".The type must be an integer type.
Although the display order standard is "ascending order (ascending numerical order)", you can change this to "descending order (ascending numerical order)" rule.
(Ascending order is "1, 2, 3, ...", descending order means "10, 9, 8, ...".)
ID
Sort by the primary key value of the referenced model."Display priority item" is not used.
Contents
It is sorted according to the contents of the referenced model.For string type, it is in dictionary order."Display priority item" is not used.
Fixed sort key of referenced model
It is supported from R7.7.The order of the sort keys specified in the list display setting of the referenced model is displayed."Display priority item" is not used.

Invalidating options in option modelYou can set the same rule as for any model.

Deleting the reference data causes inconsistency between the data.To avoid this, you can invalidate the data (leaving it rather than deleting it).Invalidation makes the system invisible, but it remains in the database.You can cancel revocation and restore it.

Example of operation

We prepared the item "invalidation" in the product model.If an arbitrary character string is set here, this data is invalid. In Figure 12, the character string "production ended" is set for one piece of data.

Figure 12 Invalidating one piece of data

Invalidated data is not displayed in the quotation model's choice.(FIG. 13)

Figure 13 Invalidated data is not displayed
For details on dealing with invalidated data,Invalidating options in option modelPlease read.

Definition method

Define "invalidation" item.Item name, item ID isAnyis.Make the type a string type.(FIG. 14)

Figure 14 Definition of invalidation items

In the estimate model, specify the item prepared in Fig. 14 as "invalid judgment item" in option setting.Type is string type.

Figure 15 Specifying invalidation items

Invalid items in the option model are also to be searchedYou can set the same rule as for any model.

Please read the link above for setting.

Example of operation

In the list box, the option "(not selected)" which means "nothing selected" is prepared as a standard.This is alwaysAt the beginningIt will be placed.(You can not change this order.)

Figure 16 Unselected items are prepared

Corresponding to search screen

When this item is used as a search condition, unselected items are also prepared automatically.You can search for data that is "(not selected)".

Fig. 17 "(not selected)" is also prepared for the search condition
When using a radio button or check box, this function is unnecessary because there is a state that nothing is selected.

Definition method

Opens the Input Control tab in the model item detailed definition of the reference source model (the estimate model in this example).Activate "Model reference> Prepare not selected".Since this setting is enabled by default, please cancel this setting when it is unnecessary.

Figure 18 Setting to prepare unselected items

If you do not prepare unselected items, it will look like Figure 19.in this case,We will not prepare the state that it will not be selected.

Figure 19 List box not providing unselected items

When referring to this item from an expression

When using this item as a calculation formula, the initial value when the new registration screen is opened is null.

If you do not create an unselected item, you can obtain the initial value of the option (by specifying #id or #content).

Specification of narrowing down of options, Even if you do not create an unselected item, the initial value is null.The selection value is set for the first time by narrowing down operation.

Example of operation

If you specify a list box as a search condition, you can search all data by specifying the option "all".

(This is provided as standard only when searching.It is not displayed when newly registering/updating data.)

Figure 20 Option "All" is prepared for the search condition

Definition method

Opens the search control tab of model item detail definition.Activate "Prepare" All "when using list box" prepared in model reference field.Since this setting is enabled by default, please cancel this setting when it is unnecessary.

Figure 21 Setting to prepare "All" when using list box

Example of operation

You can change the input type of the registration/update screen and search screen.Here is an example using a radio button on the search screen.

Figure 22 Using the radio button on the search screen

Definition method

From the model item detail definition, open the Search Control tab.Specify "Switch display method" in model reference.(It is blank in the standard.)

Figure 23 Switching method of display method

Example of operation

An example of selecting a customer in the list box is shown in Figure 25.The choice is "name (full name)".

Figure 24 The choices are "Name (Full Name)".

Definition method

On the customer model side, add an item to store "Name (Name or Kana)".

Figure 25 Defining additional items for alternatives

This item is obtained by automatic calculation.It is not saved in the database. In this example, the expression is as follows.

${name}+"("+${kananame}+")"
Fig. 26 Setting of equation

This item is hidden when inputting.(Fig. 27) Also make it hidden when outputting.(FIG. 28)

Figure 27 Setting hidden items when entering
Figure 28 Setting Hidden Items on Output

In the referencing model (the side referring to this model), specify the above items as referenced model items.

See Figure 29 Setting the model item

The reference key item of the reference source model ("estimate" model in the above example) holds the ID value of the reference destination model.It is not a content part.

When you check the table on the database, you can see that the ID value is stored.

Treatment of unselected

"((Not selected)" is stored as NULL in the database.