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

Commands window.<command>

Window commands contains operations that communicates directly with user. They are processed in the window that started the script.

Window commands are available only in client application.

Command window.confirm(question=)

Open dialogs with translated question. and confirmation buttons yes / no.

If used select no, script is cancelled. There is no way how to continue and select alternative way

Example:

"window.confirm(question=ButtonName_tooltip)"

Usage notes:

  • Do not use command to check if user want to start operation. For entry confirmation used confirm option of the operation itself.
"command":{ "confirm":true|questionName }

Command is useful when confirmation depends on some condition evaluated in the script.

  • Don't forget using question attribute; if missed it opens empty dialog. Don't write the message to the attribute, it is always translated from the translations of the object that called the script
  • Don't use name of the translation string with spaces, it won't work because spaces are ignored and removed during processing.

Command window.userInput(question=)

The command opens dialog and request used to input the value. It has several forms according to what type of input is requested.

Text input

"window.userInput(question=getData)"
"window.userInput(startValue=attr.optionValue,question=setOption)"

Request input from the text line. Example at the second line sets default value so that it is easier just to confirm the input.

Optional value selection from client-defined enumeration

"window.userInput(question=rejectReason,enum='tsk/Meeting-RejectReason')"
"window.userInput(question=qAssignMsg,enumType=optUserEnum,enum=tsk/Task-AssignmentReason)"

Where attribute enum with client-defined enumeration is added, application opens dialog for the text line input and allows filling value from pre-defined optional values predefined in the client-defined enum list.

Both lines create technically the same type of dialog.

Date input window.userInput(type=datetime, question=, startValue=)

"window.userInput(type=datetime, question=qcreateNextMeeting, startValue=attr.dtNextPlan)"

When type is defined. the dialog request value of the predefined type. Currently supported types are enum, date and datetime and default value string.

Command window.confirmSave

Function check if there are data waiting to be saved. If yes, asks user to save them. If user rejects, script is cancelled.

Function is supported for all type of windows but only detail window has implemented functionality. For others the function is ignored (makes nothing).

Currently system mostly saves data automatically when user activates a function. So that this function has very limited usage.

Command window.focus

Function activate window and make focus to it.

Function can return focus to the window where script has started event when new window was opened. This would rarely be appreciated system behaviour and so the function is used only internally although it is available also for script.

Comand window.halt

Logout user and closes the session. The logout is processed immediately without confirmation.

Command window.selectFromEnum(msg=, enum=, enumLimit=, retValName=)

Input selection from list of values.

   "window.selectFromEnum(msg=qWhatImplement,enum=am/anObjects,enumLimit=implement,retValName=systemType,optAttribute=X)"

Attributes:

  • msg=qWhatImplement – translated string with them message
  • enum=am/anObjects – name of the enum to use
  • enumLimit=implement – optional enumeration list condition to select which items are listed
  • retValName=systemType – optional name of the attribute where is stored the answer

Enum limit can contain any other attributes that are available as attributes for enumLimit evaluation. So that

  • optAttribute=X
    is passed the enumLimit evaluation as a attribute that can be used.

The file input – window.fileInput(fileType=,question=)

Function opens dialog to upload the file. File is automatically uploaded to the server and available for business logic processing

Example

The example opens dialog with message from the qImportString translation and requests file with extension ooo.

Upload file:

   "window.fileInput(question=qImportFile,fileType=application/_.ooo)"

Access file in the server business function:

   $fileName = $_SESSION['lastUploadedFile'];
   $content = file_get_contents($filename);

Notes

  • File is temporarily stored in the temp directory. Business function processing the file should be stored immediately after the upload command.
  • When user cancels upload, the script is cancelled and further steps are not processed.

command window.message(message=,makeEval?=,msgTranslated?=)

Displays user message with information

Attributes:

  • message – message code that is translated from window language codes
  • makeEval – when true, message is completely evaluated, default is false because it makes some troubles with messages from server;
    when false (default) – only translation is made without evaluation
  • msgTranslated – when true – message is not translated. Use when server translates message and send it translated (used when complicated message is generated by server
    )