Defining selectInfoAreaId and selectFieldId Functions

Learn to define selectInfoAreaId and selectFieldId Functions.

The selectInfoAreaId and selectFieldId functions provide users with the possibility to select an info area and then a field from this info area (Examples in UPDATE_DEFAULT: C4, F2, Z5).

To implement this functionality define two Select-Functions for the desired fields:

  • selectInfoAreaId allows the user to select an info area.
  • selectFieldId allows the user to select a field from the info area specified by selectInfoAreaId.

Syntax

Name

Type

Description

selectInfoAreaId

function

select-function

     

from

object

This parameter is optional and sets up the Info Area selection dialog and its behavior. It contains the following (optional) property.

infoAreaId

string

The info area ID of a parent info area. If specified only children of this info area can be selected.

     

target

object

This parameter is optional and defines how the selected info area is treated. It contains one or more of the following (optional) properties.

fieldId

int or string

The unique field ID or XML name of the field that receives the info area ID. If not present the ID of the field the Select-Function is defined for is used.

fieldIdToClear

int or string

The unique field ID or XML name of a field that is cleared when another info area is selected.

Name

Type

Description

selectFieldId

function

select-function

     

from

object

This parameter is mandatory, and sets up the Field selection dialog and its behavior. It contains following properties.

Note: You must specify either infoaAreaFieldId or infoAreaId for the select-function to work.

infoAreaId

string

The ID of the info area to select the field from.

infoAreaFieldId

int or string

The unique field ID or XML name of the field containing the ID of the info area to select the field from.

     

target

object

This parameter is optional and defines how the selected field is treated. It contains the following (optional) property.

fieldId

int or string

The unique field ID or XML name of the field that receives the info area ID. If not present the ID of the field for which the Select-Function is defined is used.

Example

To select an info area and write it's ID to the field (defined for the Info Area field in the Question info area (F2)):
selectInfoAreaId({
               target: {
               fieldIdToClear:"Field"
               }
               })
To select a field from the info area specified in the Info Area field (XML name "File"):
selectFieldId({
               from: {
               infoAreaFieldId:"File"
               }
               })