Support > Repository > Function > Model reference
ja | en

Here are five functions related to model reference.

ISEMPTR7.4 |  SELECTED |  CHECKED |  EXACT |  CONTAINS |  ISNULL |  Restriction

ISEMPTY (item name)

Determines whether a value is included in an item.Returns true if not entered.It returns false if it is already entered.

In case of numerical type and mandatory item, since the initial value 0 is always included, the return value of ISEMPTY is always false.

It corresponds also to reference linked type items.

Example: Check whether the reference linked item refitem 1 has not been entered.

IF (ISEMPTY ($ {refitem 1}), "Not yet entered", "There is a value")

SELECTED (list box/radio type item name)

Judge whether list box or radio button is not selected yet. Returns true if the value of the item specified in the argument was selected.Otherwise it returns false.

It can be used for list box/radio type items included in the model, or conditions such as SUM and COUNT.Only the condition part can specify elements of the foreign key child model.

Example: Determine selection status of list box item mrefmodel

IF (SELECTED ($ {mrefmodel}), "selected", "unselected")

Example: Determine selection status of list box item mrefmodel in repeating container

IF (SELECTED ($ {cont/cmrefmodel}), "selected", "unselected")

Example: Selected in the condition part of the child model of the foreign keyNot inCounting things

COUNT(${Child_lp}, "SELECTED(${Child_lp.mrefmodel})==false")

CHECKED (checkbox type item name)

Check the number of checkbox items selected.The return value is an integer type.

It can be used for the check box type item included in the model, or the condition part such as SUM or COUNT.Only the condition part can specify elements of the foreign key child model.

Example: Count checkbox type choices.

CHECKED(${checkboxitem})

Example: On the parent model side, count only child models that have one or more check boxes for foreign key child models selected.In this case, CHECKED function is not directly described.

On the parent model side, you can not specify the checkbox of the foreign key child model directly as an argument.
For this reason, the following example prepares the item checkednum that records the number of check boxes on the child model side. In addition, this item is added to the list display, and it is made as a hidden item.

>0")

EXACT (checkbox type item name, value)

In the check box type item of the first argumentFirst selected valueIs equal to the value of the second argument.The return value is boolean (true/false).

Example: Check whether the first choice (content part) A checked in check box type item is.

EXACT(${checkboxitem}, "A")
EXACT(${checkboxitem#content}, "A")

Example: Check whether the (ID part) of the first option checked in the checkbox type item is 1000 or not.

EXACT(${checkboxitem#id}, 1000)

this function isAlso explained in character string processingdoing.

CONTAINS (check box type item name #array, acquisition pattern, value)

In the check box type item of the first argumentMultiple selected valuesIs equal to the value of the third argument.The return value is boolean (true/false).For the first argument, "#array" must be added after the item name.Specify "id" or "content" as the second argument.Specify whether they are ID part or content part respectively.

Example: Check whether the option item (ID part) is included in the option checked in the checkbox type item.

CONTAINS(${checkboxitem#array}, "id", 1000)

Example: Check whether or not "A" is included in the option (checked in the checkbox type item).

CONTAINS(${checkboxitem#array}, "content", "A")

ISNULL (item name)

Checks whether the value of the specified item does not exist (not set).

This function can only be used for condition parts such as SUM and COUNT.

Example: On the parent model side, store reference item of the foreign key child model (reference destination is date type) Count data for which attendance_date is not set.

COUNT(${attendance_lp}, "ISNULL(${attendance_lp.attendance_date})")

Example: store reference item in recurring container (referenced by date type) Count data for which cont/cdate is not set.

COUNT(${cont}, "ISNULL(${cont/cdate})"})

  • If the referenced model is a compound primary key, these functions are not available.
  • Input check (user definition formula) can not perform set operations such as COUNT and SUM.Therefore, it is not possible to use SELECTED or ISNULL function in the condition part of COUNT, SUM function.