Related links
Front-End Scripting
CMS - Content Management & Web API services
Task, Project, Quality
Task & Task pattern
System Management (part of framework)
HR - Human Resources
Mobile & Web Application
- clientprogramming_fevaldataobject
- userinterface-objectstructure
- cliplink
- npmlibraries
- fclip
- drag-drop
- AyMINE Application
- objectdefinition_inlineedit
- npmlibraries_stringlibrary
- clientprogramming
- mobileapplication
- languagesupport
- objectdefinition_multiupdate
- clientprogramming_fevalglobal
- clientprogramming_fevallanguage
- clientprogramming_fevaluser
- objectdefinition_viewdefinition
- offlineobjects
- System console
- Runtime debugging
- objectdefinition_detailview
Framework Core functionality
- prices
- managementfaq
- prices_private-installation
- clientdefinedattributes
- phplibraries
- servermethods
- io_export
- AyMINE Framework Server
- The AyMINE licence model
- System Rights
- servermethods_frmfrm
- io_import
- multiclient-architecture
- servermethods_stringsandtranslations
- frmevent
- System messaging
- usersessions
- User defined fields
Libraries & Lincences
Module - support for management
FI - Finance Management
Sales & Asset management
Sales related services
Description of a part of the AM module - sales partCounter limiters
Counter limiters allow using single counter for several situations or allow only some counter values according to other conditions.
Limiters are used only by front-end application, not by back-end (at least their usage by back-end does not have support from framework).
Example:
{ "name":"defLifeCycle", "fields": [
{"name":"proposed","short":"PR",
"systemObject":"=['tskInfItem', 'tskObligation', 'tskPolicy'].includes(obj.myObjName)" },
. . .
}
Part of the counter Default life cycle with single field show usage of the limiter: Limiter is a definition of the attributes, that is evaluated during the system run and only these fields from the counter, that fulfil the condition, are valid and could be used.
Limiters should be defined for object fields, that uses the counter and apply the limiter. For hereinbefore mentioned example, the related object field definition is:
"lifecycleStatus":{
"type":"enum",
"enum":"tsk/defLifeCycle",
"enumLimit":"systemObject",
"default":"UN"
}
The field enumLimit says, which field in the counter fields is used to check the field validity.
Simple usage
In the simplest example, values in the fields contain only true / false values and the limiter in the field definition defines value used to check fields.
Example:
{"name":"itemIcons",
"type":"icon",
"fields": [
{"icon":"improvement", "action":false, "infItem":true, "area":true},
{"icon":"company", "action":false, "infItem":true, "area":true}
]
}
The example presents part of the counter with icons. Each field contain names where the icon is offered for selection. Counter is used for selection using the following definition:
"icon": {
"order":"I",
"type":"optEnum",
"enum":"tsk/itemIcons",
"enumLimit":"action"
}
Example is an attribute in the definition of the detail view for action. It says that user can select item from the counter tsk/itemIcons but only those that has filed action = true.
Sophisticated usage of the counter limiters
Counter limiter might be defined methods or even recursively evaluated methods that are applied when fields are selected.
- Field enumLimit in the attrib.ute definition could contain method evaluated before user selects the counter field. It can limit the available fields according to the current status of the object. E.g. it can allow only forward-direction of the status change (only next states are allowed to select, not backward states.)
- Field in the counter can contain method (see the first example). The method is evaluated upon the object for which the counter is used.
Using limiter for value selection
Limiter can be also used when used select a value during the orchestrated script execution.
{
"a":"window.selectFromEnum
(msg=qSelAggreeStatus,
enum=tsk/defLifeCycle,
retValName=newAgree)",
"attrs":[
{
"name":"enumLimit",
"value":"=g.encaps('=attr.forAll || (attr.eCountry && attr.eCountry.includes(obj.parent.country))', 2)"
}
]
}
Defines the request to select value from counter (from the 1st example). Value of the limiter ":"='=attr.systemObject.includes( tskActivityRec)' is evaluated twice
- At first when accepted by the function as the limiter. The first evaluation “removes” envelope and prepare internal condition for evaluation for each field
=attr.systemObject.includes( tskActivityRec)'.
The condition is evaluated and selects only those fields that have defined attribute systemObject and the attributes contains _ tskActivityRec_ value.