Contents |
Increment number widget value
Widget is used to increment value in a number widget.
Widget is hidden.
Widget id, ${gbamID}
:
actionIncrementNumberValue
Back to GBAM widgets table
Datatypes
Value is stored into compatible widgets which are number
datatype. Widgets which are not of valid datatype should not be shown in the list of targets available to store the information.
Predefined user data
PreLoaded
Properties panel
User will configure this data in properties panels of selected widget:
GENERAL
- "database column headline",
${widgetLabel}
VALIDATIONS
- -
internal validators
- -
ACTION
- "increment value",
${targetWidgetId}
incremented value will be stored to target widget when action is executed. Target widgets can be those that are of datatypenumber
- "increment",
${increment}
numerical value which is added to current value each time action is executed. If${targetWidgetId}
is integer then only integer inputs are allowed if decimal then decimal and integer is allowed. Value can not be empty - "on event" triggers the action in common widget code at specific event. Events are are listed in a dropdown can be:
screen load
widget code is added into root node of the screen in attributegn:act_beforeLoad
as:
gn:act_beforeLoad="[gn:act_trigger]|[@+id/idOfCurrentWidget,gn:act_set]" gn:act_set="Common widget code"
Button save
, trigger code:
[gn:act_trigger]|[@+id/idOfCurrentWidget,gn:act_set]
- as attribute to Button save widget:
gn:act_set="Common widget code"
- needs to be added to widget Button save at:
- Two options when to execute:
before
, then insert the trigger code after this line${listWidgetToVariable}
in snippet at Button_save#GBAM_Code_Variables:after
, then insert the trigger code after this line[gn:act_resetVariables]|[${listofVariableIds1}];
in snippet at Button_save#GBAM_Code_Variables
Button clean widgets
, trigger code:
[gn:act_trigger]|[@+id/idOfCurrentWidget,gn:act_set]
- as attribute to Button clean widgets widget:
gn:act_set="Common widget code"
- Two options when to execute:
before
, then insert the code after this line[gn:act_cleanWidgets]|[${listofWidgetIds}],[gn:act_resetVariables]|[${listofVariableIds}]
in snippet at Button_clean_widgets#GBAM_Code_Variablesafter
, then insert the code after this line[gn:act_cleanWidgets]|[${listofWidgetIds}],[gn:act_resetVariables]|[${listofVariableIds}]
in snippet at Button_clean_widgets#GBAM_Code_Variables
Button query
, trigger code:
- Two options when to execute:
- Two options when to execute:
[gn:act_trigger]|[@+id/idOfCurrentWidget,gn:act_set]
- as attribute to Button query widget:
gn:act_set="Common widget code"
before
, then insert the code before this line[gn:act_if]|[[gn:act_rawQueryToWidgets]|[...
in snippet at Button_query#GBAM_Code_Variablesafter
, then insert the code before this line[gn:act_hideKeyboard]|[]
in snippet at Button_query#GBAM_Code_Variables
ACTION MESSAGES
- -
DATABASE
- -
Code snippets
GBAM Code Variables
Variables which are used in code snippet below but not defined in user modifiable inputs.
${widgetID}
,{variableId}
is generated based on the${widgetID}
${tableName}
${resultVariable}
, value is stored into variable after query before setting it to widget${targetWidgetId}
Common widget code
screen.xml
[gn:act_calculate]|[@+id/${targetWidgetId},@+id/${targetWidgetId}+${increment}]