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_filterDistinctRows</code></span> Category:Action_Librar...")
 
Line 3: Line 3:
 
[[Category:Action_Library]]
 
[[Category:Action_Library]]
  
;Description: Action is to retrieve device serial number into [[target]]
+
;Description: Action used to remove duplicate rows from [[target]]
 
;Action returns: void
 
;Action returns: void
 
==Action signatures==
 
==Action signatures==
  
:;<code>[gn:act_serialToTarget]|[target]</code>
+
:;<code>[gn:act_filterDistinctRows]|[target]</code>
  
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
Line 15: Line 15:
 
|-
 
|-
 
| <code>[[target]]</code>
 
| <code>[[target]]</code>
| [[target]] into which serial number will be stored
+
| [[target]] from where duplicate rows will be removed
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
:*<code>[[Datatypes#text|text]]</code>
+
:*<code>[[Datatypes#rows|rows]]</code>
 +
:*<code>[[Datatypes#rowsColumn|rowsColumn]]</code>
 
|}
 
|}
  
Line 23: Line 24:
  
 
=====initial value=====
 
=====initial value=====
:<code>device serial number</code> = <code>273583945126833</code>
+
:<code>@variable/onlyDistinctDeviceTypes</code> = <code>John,John,Mark,Mark,John</code>
:<code>@variable/test</code> = <code></code>
 
  
 
=====variables.xml=====
 
=====variables.xml=====
 
<syntaxhighlight lang="xml">
 
<syntaxhighlight lang="xml">
<variable id="test" type="text"/>
+
<variable id="onlyDistinctDeviceTypes" type="rowsColumn" defaultValue="" columnType="pointer" />
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Line 39: Line 39:
 
     android:layout_height="wrap_content"
 
     android:layout_height="wrap_content"
 
     android:visibility="gone"
 
     android:visibility="gone"
     gn:act_set="[gn:act_serialToTarget]|[@variable/test]" />
+
     gn:act_set="[gn:act_filterDistinctRows]|[@variable/onlyDistinctDeviceTypes]" />
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
=====after action execution=====
 
=====after action execution=====
:<code>@variable/test</code> = <code>273583945126833</code>
+
:<code>@variable/onlyDistinctDeviceTypes</code> = <code>John,Mark</code>
  
 
<hr>
 
<hr>

Revision as of 12:05, 18 August 2017

gn:act_filterDistinctRows

Description
Action used to remove duplicate rows from target
Action returns
void

Action signatures

[gn:act_filterDistinctRows]|[target]
Parameter Description
target target from where duplicate rows will be removed

Example

initial value
@variable/onlyDistinctDeviceTypes = John,John,Mark,Mark,John
variables.xml
<variable id="onlyDistinctDeviceTypes" type="rowsColumn" defaultValue="" columnType="pointer" />


screen.xml
<FrameLayout
    android:id="@+id/exampleFrame"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:visibility="gone"
    gn:act_set="[gn:act_filterDistinctRows]|[@variable/onlyDistinctDeviceTypes]" />
after action execution
@variable/onlyDistinctDeviceTypes = John,Mark