From wiki.ginstr.com
Jump to: navigation, search

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
VALIDATIONS
  • -
internal validators
  • -
ACTION
  • "increment value in widget", ${targetWidgetId} incremented value will be stored to target widget when action is executed. Target widgets can be those that are of datatype number
  • "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 attribute gn:act_beforeLoad as:
gn:act_beforeLoad="[gn:act_trigger]|[@+id/idOfCurrentWidget,gn:act_set]"
gn:act_set="Common widget 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:
[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:
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"
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}]