Support > Repository > A formula > Model reference
ja | en

In the model reference item, there are "ID part" and "content part". In the automatic calculation formula, you can specify which part to use.

The model reference item consists of an ID part and a content part.It can be handled in the following format.

Example: Structure of staff model

ID part Content section
1000 Yamada Taro
1001 Ichiro Suzuki

Suppose you have prepared an item staffname that refers to the above staff model.
In the automatic calculation formula, you can make the following specifications.


We will acquire the contents section.The return type is the type of the item specified in "Referenced model item" to the staff model. In the above example, the string "Yamada Taro" "Ichiro Suzuki" is returned.


Acquire ID part.The type of the return value is "the primary key of the reference model" to the staff model.The type is the same as the type of the primary key item of the staff model. In the above example, the numbers 1000, 1001 are returned.


It has the same meaning as $ {staffname}.

Acquisition of content part in user definition check

User defined checkIn case of #, it is necessary to specify #content to acquire the content part. In the above example, use $ {staffname # content} instead of $ {staffname}.

Handling of concatenated content part

You can not refer to the content part that has been set to display multiple items by concatenation.

Handling list box items

Items referred to as list boxesIs specified in the expression, the initial value when the new registration screen is opened is null.This is because the top of the choice is "(not selected)".AccordinglyDo not create unselected itemsIn the case of the initial value, you can get the value of the beginning of the displayed option (by specifying # id or #content).

Even if you do not create an unselected item, the initial value is null when you narrow down the choices.(The selection value is set for the first time by performing the narrowing operation.)

You can not specify #id, #content for reference linkage items.We will treat the posted values ​​as they are.

The ID value is stored in the item of the reference linkage source as shown in Fig.

Handling of linked items referring to Figure 1

Here, if you want to use "content" of "unit price model", refer to the contents section as shown in Fig.

See Fig. 2 Connecting interlocking

The type of $ {XXX # id} is the type of the primary key of the referenced model.

Therefore, when using it within a function, as necessaryTOSTRTo convert it into a character string,VALUEConversion may be done by converting it to a numerical value using.

Example: When the item item 1 of the model reference (list box) has been selected, it returns the selected ID value.Otherwise it returns the character string "(not selected)".(This calculation result is stored in the item of character string type, and so on.)

IF (SELECTED ($ {item 1}), TOSTR ($ {item 1 # id}), ((not selected) ")

Item1 # Since id is an integer type, it is enclosed in function TOSTR and it is converted to character string type.

#content can not be specified for the model reference item in the expression used in the job (activation condition in mail send/receive job, expression on success/failure, etc.) description.Only # id is available.