From wiki.ginstr.com
Jump to: navigation, search
(Created page with "<div style="float:right; clear:both; margin-left:0.5em;">__TOC__</div> <span STYLE="font-size: xx-large"><code>gn:act_convertDatatype</code></span> Category:Action_Library...")
 
(Supported source1 to source2 widget combinations)
(3 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
===Copy data===
 
===Copy data===
  
:;<code>[gn:act_copyData]|[source,target]</code>
+
:;<code>[gn:act_convertDatatype]|[source1,source2,target]</code>
  
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
Line 16: Line 16:
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| <code>[[source]]</code>
+
| <code>[[source|source1]]</code>
| [[source]] from where the value will be copied
+
| [[source]] from where the value will be converted
 +
* Valid [[source|sources]]:
 +
** any [[source]]
 +
|-
 +
| <code>[[source|source2]]</code>
 +
| [[source]] to which datatype the value will be converted
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
 
** any [[source]]
 
** any [[source]]
 
|-
 
|-
 
| <code>[[target]]</code>
 
| <code>[[target]]</code>
| [[target]] where the value will be stored
+
| [[target]] where the converted value will be stored
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
 
** any [[target]]
 
** any [[target]]
Line 29: Line 34:
  
 
====Example====
 
====Example====
:<code>@+id/sourceWidgetId</code> - source<br>
+
:<code>@+id/sourceWidgetId1</code> - source1<br>
 +
:<code>@+id/sourceWidgetId2</code> - source2<br>
 
:<code>@+id/targetWidgetId</code> - target<br>
 
:<code>@+id/targetWidgetId</code> - target<br>
:; ⤷ <code>[gn:act_copyData]|[@+id/sourceWidgetId,@+id/targetWidgetId]</code>
+
:; ⤷ <code>[gn:act_convertDatatype]|[@+id/sourceWidgetId1,@+id/sourceWidgetId2,@+id/targetWidgetId]</code>
  
===Supported [[source]] to [[target]] widget combinations===
+
===Supported [[source|source1]] to [[source|source2]] widget combinations===
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
Line 39: Line 45:
 
! scope="col" | Target
 
! scope="col" | Target
 
|-
 
|-
| <code>[[GnMediaAction]]</code>
+
| <code>[[Datatypes#number|number]]</code>
| <code>[[GnMediaGallery]]</code>
+
| <code>[[Datatypes#text|text]]</code>
 +
|-
 +
| <code>[[Datatypes#counter|counter]]</code>
 +
| <code>[[Datatypes#text|text]]</code>
 +
|-
 +
| <code>[[Datatypes#status|status]]</code>
 +
| <code>[[Datatypes#text|text]]</code>
 +
|-
 +
| <code>[[Datatypes#date|date]]</code>
 +
| <code>[[Datatypes#text|text]]</code>
 +
|-
 +
| <code>[[Datatypes#time|time]]</code>
 +
| <code>[[Datatypes#text|text]]</code>
 +
|-
 +
| <code>[[Datatypes#datetime|datetime]]</code>
 +
| <code>[[Datatypes#text|text]]</code>
 +
|-
 +
| <code>[[Datatypes#gps|gps]]</code>
 +
| <code>[[Datatypes#text|text]]</code>
 +
|-
 +
| <code>[[Datatypes#pointer|pointer]]</code>
 +
| <code>[[Datatypes#text|text]]</code>
 +
|-
 +
| <code>[[Datatypes#text|text]]</code>
 +
| <code>[[Datatypes#number|number]]</code>
 +
|-
 +
| <code>[[Datatypes#counter|counter]]</code>
 +
| <code>[[Datatypes#number|number]]</code>
 +
|-
 +
| <code>[[Datatypes#date|date]]</code>
 +
| <code>[[Datatypes#number|number]]</code>
 +
|-
 +
| <code>[[Datatypes#time|time]]</code>
 +
| <code>[[Datatypes#number|number]]</code>
 +
|-
 +
| <code>[[Datatypes#datetime|datetime]]</code>
 +
| <code>[[Datatypes#number|number]]</code>
 +
|-
 +
| <code>[[Datatypes#text|text]]</code>
 +
| <code>[[Datatypes#counter|counter]]</code>
 +
|-
 +
| <code>[[Datatypes#number|number]]</code>
 +
| <code>[[Datatypes#counter|counter]]</code>
 +
|-
 +
| <code>[[Datatypes#date|date]]</code>
 +
| <code>[[Datatypes#counter|counter]]</code>
 +
|-
 +
| <code>[[Datatypes#time|time]]</code>
 +
| <code>[[Datatypes#counter|counter]]</code>
 +
|-
 +
| <code>[[Datatypes#datetime|datetime]]</code>
 +
| <code>[[Datatypes#counter|counter]]</code>
 +
|-
 +
| <code>[[Datatypes#date|date]]</code>
 +
| <code>[[Datatypes#long|long]]</code>
 +
|-
 +
| <code>[[Datatypes#datetime|datetime]]</code>
 +
| <code>[[Datatypes#long|long]]</code>
 +
|-
 +
| <code>[[Datatypes#text|text]]</code>
 +
| <code>[[Datatypes#date|date]]</code>
 +
|-
 +
| <code>[[Datatypes#number|number]]</code>
 +
| <code>[[Datatypes#date|date]]</code>
 +
|-
 +
| <code>[[Datatypes#counter|counter]]</code>
 +
| <code>[[Datatypes#date|date]]</code>
 
|-
 
|-
| <code>[[GnCaptureSignature]]</code>
+
| <code>[[Datatypes#datetime|datetime]]</code>
| <code>[[GnMediaGallery]]</code>
+
| <code>[[Datatypes#date|date]]</code>
 
|-
 
|-
| <code>[[Datatypes#pointer|pointer]]</code> [[Variables|variable]]
+
| <code>[[Datatypes#time|time]]</code>
| <code>[[Datatypes#text|text]]</code> [[Variables|variable]]
+
| <code>[[Datatypes#date|date]]</code>
 
|-
 
|-
| <code>[[Datatypes#rows|rows]]</code> [[Variables|variable]]
+
| <code>[[Datatypes#text|text]]</code>
| <code>[[Datatypes#rows|rows]]</code> [[Variables|variable]]
+
| <code>[[Datatypes#datetime|datetime]]</code>
 
|-
 
|-
| <code>[[GnListView]]</code>
+
| <code>[[Datatypes#number|number]]</code>
| <code>[[Datatypes#rows|rows]]</code> [[Variables|variable]]
+
| <code>[[Datatypes#datetime|datetime]]</code>
 
|-
 
|-
| <code>[[Datatypes#rows|rows]]</code> [[Variables|variable]]
+
| <code>[[Datatypes#counter|counter]]</code>
| <code>[[GnListView]]</code>
+
| <code>[[Datatypes#datetime|datetime]]</code>
 
|-
 
|-
| <code>[[GnEditText]]</code>
+
| <code>[[Datatypes#date|date]]</code>
| <code>[[GnEditText]]</code>
+
| <code>[[Datatypes#datetime|datetime]]</code>
 
|-
 
|-
| <code>[[GnDropDown]]</code>
+
| <code>[[Datatypes#time|time]]</code>
| <code>[[GnEditText]]</code>
+
| <code>[[Datatypes#datetime|datetime]]</code>
 
|-
 
|-
| <code>[[GnPhoneNumber]]</code>
+
| <code>[[Datatypes#text|text]]</code>
| <code>[[GnPhoneAction]]</code>
+
| <code>[[Datatypes#time|time]]</code>
 
|-
 
|-
| <code>[[GnPhoneNumber]]</code>
+
| <code>[[Datatypes#number|number]]</code>
| <code>[[GnPhoneNumber]]</code>
+
| <code>[[Datatypes#time|time]]</code>
 
|-
 
|-
| <code>[[GnEmail]]</code>
+
| <code>[[Datatypes#counter|counter]]</code>
| <code>[[GnEmail]]</code>
+
| <code>[[Datatypes#time|time]]</code>
 
|-
 
|-
| <code>[[GnEditText]]</code>
+
| <code>[[Datatypes#date|date]]</code>
| <code>[[GnEmail]]</code>
+
| <code>[[Datatypes#time|time]]</code>
 
|-
 
|-
| <code>[[GnDatePicker]]</code>
+
| <code>[[Datatypes#datetime|datetime]]</code>
| <code>[[GnEditText]]</code>
+
| <code>[[Datatypes#time|time]]</code>
 
|-
 
|-
| <code>[[GnDateTimePicker]]</code>
+
| <code>[[Datatypes#text|text]]</code>
| <code>[[GnEditText]]</code>
+
| <code>[[Datatypes#status|status]]</code>
 
|-
 
|-
| <code>[[GnMediaAction]]</code>
+
| <code>[[Datatypes#text|text]]</code>
| <code>[[GnMediaAction]]</code>
+
| <code>[[Datatypes#gps|gps]]</code>
 
|-
 
|-
| <code>[[GnMediaAction]]</code>
+
| <code>[[Datatypes#text|text]]</code>
| <code>[[GnImageView]]</code>
+
| <code>[[Datatypes#email|email]]</code>
 
|-
 
|-
| <code>[[GnIBeacon]]</code>
+
| <code>[[Datatypes#text|text]]</code>
| <code>[[GnDropDown]]</code>
+
| <code>[[Datatypes#pointer|pointer]]</code>
 
|-
 
|-
| <code>[[GnIBeacon]]</code>
+
| <code>[[Datatypes#email|email]]</code>
| <code>[[GnMediaGallery]]</code>
+
| <code>[[Datatypes#pointer|pointer]]</code>
 
|-
 
|-
| <code>[[GnAutoCompleteTextView]]</code>
+
| <code>[[Datatypes#email|email]]</code>
| <code>[[GnEditText]]</code>
+
| <code>[[Datatypes#text|text]]</code>
 
|-
 
|-
| <code>[[GnIBeacon]]</code>
+
| <code>[[Datatypes#number|number]]</code>
| <code>[[GnAutoCompleteTextView]]</code>
+
| <code>[[Datatypes#pointer|pointer]]</code>
 
|-
 
|-
 
|}
 
|}

Revision as of 10:16, 8 August 2019

gn:act_convertDatatype

Description
Action used to copy content from source widget to destination widget.
Action returns
void

Action signatures

Copy data

[gn:act_convertDatatype]|[source1,source2,target]
Parameter Description
source1 source from where the value will be converted
source2 source to which datatype the value will be converted
target target where the converted value will be stored

Example

@+id/sourceWidgetId1 - source1
@+id/sourceWidgetId2 - source2
@+id/targetWidgetId - target
[gn:act_convertDatatype]|[@+id/sourceWidgetId1,@+id/sourceWidgetId2,@+id/targetWidgetId]

Supported source1 to source2 widget combinations

Source Target
number text
counter text
status text
date text
time text
datetime text
gps text
pointer text
text number
counter number
date number
time number
datetime number
text counter
number counter
date counter
time counter
datetime counter
date long
datetime long
text date
number date
counter date
datetime date
time date
text datetime
number datetime
counter datetime
date datetime
time datetime
text time
number time
counter time
date time
datetime time
text status
text gps
text email
text pointer
email pointer
email text
number pointer