Give us contact

Do you prefer to ask us directly?

Call us +420 605 203 938 (the Czech Republic)

or use this contacts

AyMINE

Related links


FI - Finance Management

Command select.<object-name>

Command supporting selection of a single or multiple objects from a list

Select command is a special variant of the form command. It is specifically used only for selection of object from list of objects. As a special-kind of form command it has the same general conditions, primarily it is only application command.

Command structure

select.<object-name>.list.<viewName>(purpose=, hint=, location=, selectNothing= )

Example:

{
   "a":"select.tskDefUserTask.list.forNewTaskInArea(
      purpose=selectOne,
      hint=hintName,
      location=modal,
      selectNothing=NothingSelectName)", 
   "where":"=attr.selectedObjName ? 
      `relatesToObjName like '%${g.classID(attr.selectedObjName)}%'` : 
      `relatesToObjName is null`" 
}

(Note: Single json line is here split for better readibility.)

Attributes:

purpose= selectOne | selectOne

Distinguish between single-item selection and multiple-item selection. Field is required

Function generates different attributes for single-item and multiple-item. When command requests multiple items, it will return attributes in the multiple-item format even when user selects only single item.

hint=hintName

Setup hint for the selection. Field is optional.

When filled, Selection block shows hint line above the selection list. hintName is key for the translation; translation is loaded from the translation of the calling object (not called object!)

location=modal

Settings that selection is opened as a modal – smaller window. Optional.

selectNothing=NothingSelectName

Allow user select anything and continue. Optional.

When set, select window has additional button at the bottom that allows closing window without selection and continue with the script. Name of the button is translated input string. Button icon is always the same – . Button can have tooltip text if defined in the translations.

Command options

"where":"where contidions"

Optional command attribute where is send to the server as a additional filter applied to the selection. When used, user cannot switch it off. It is added to the filters defined by server (it cannot break the access-rights controls).

Where string is evaluated so that it can contain complex selection as is in the example.