Revision as of 08:36, 4 July 2016 by Mark (talk | contribs) (Created page with "<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div> <span STYLE="font-size: xx-large"><code>gn:act_setVariable</code></span> Category:Action_Library <c...")
gn:act_setVariable
gn:act_setVariable
loads value from target and stores it to variable.
- Can be used on widgets
- any widget
- Event trigger for action
- no event, must be used in action set or conditional action.
- Can be used as
- a no event action
- Additional required attributes on bound widget
- none
Action signature
[gn:act_setVariable]|[@variable/variableId,target]
Value field content
@variable/variableId
- id of the variable which value will be stored to
target
- id of widget from which value needs to be taken
It is possible to take value stored in target and set it to variable. At present following ways to set variable are possible from either widgets or variables.
widgets
From widgets “@+id/widgetId“
to variable supported:
- to variable
type=”string”
from:GnEditText
GnDropDown
– stores selected dropdown item valueGnTextView
GnPhoneAction
– stores to widget value defined by action type (i.e.gn:s_phone
,gn:s_email
,..)
- to variable
type=”integer”
fromGnEditText
- to variable
type=”long”
from: - to variable
type=”boolean”
from: - to variable
type=”text”
from:GnEditText
GnDropDown
– stores selected dropdown item valueGnTextView
GnPhoneAction
– stores to widget value defined by action type (i.e.gn:s_phone
,gn:s_email
,..)
- to variable
type=”number”
from: - to variable
type=”status”
from: - to variable
type=”dateTime”
from: - to variable
type=”date”
from: - to variable
type=”phoneNumbers”
from:GnEditText
– value will get stored as single phone number to variableGnPhoneNumber
GnPhoneAction
– value will get stored as single phone number to variable when widget action is set togn:s_phone
orgn:s_sms
- to variable
type=”pointer”
from:GnDropDown
– selects item by pointer id, if it’snull
then by valueGnEditText
– value will be set as pointer id and pointer value will benull
- to variable
type=”signature”
fromGnCaptureSignature
- to variable
type=”pictures”
fromGnMediaAction
- to variable
type=”audio”
fromGnMediaAction
- to variable
type=”video”
fromGnMediaAction
- to variable
type=”documents”
toGnMediaAction
- to variable
type=”email”
from:GnEditText
– value will get stored as single email to variableGnEmail
GnPhoneAction
– stores to widget value defined by action typegn:s_email
- to variable
type=”Gps”
fromGnEditText
variables
- from
@variable/someVariableId
to identical type variable
- i.e. from variable
“text”
to variable“text”
- i.e. from variable