From wiki.ginstr.com
Jump to: navigation, search
(Get row values based on column values)
m (Example)
Line 42: Line 42:
 
====Example====
 
====Example====
 
:<code>@+id/lstResidents</code> - source<br>
 
:<code>@+id/lstResidents</code> - source<br>
:<code>1: resident_firstName, resident_lastName</code> - search column names<br>
+
:<code>resident_firstName, resident_lastName</code> - search column names<br>
 
:<code>@+id/firstName, @+id/lastName</code> - search source<br>
 
:<code>@+id/firstName, @+id/lastName</code> - search source<br>
:<code>2: resident_firstName, resident_lastName</code> - value column names<br>
+
:<code>resident_firstName, resident_lastName</code> - value column names<br>
 
:<code>@+id/firstName, @+id/lastName</code> - target<br>
 
:<code>@+id/firstName, @+id/lastName</code> - target<br>
 
:; ⤷ <code>[gn:act_getRowValues]|[@+id/lstResidents;;resident_firstName,resident_lastName;@+id/firstName,@+id/lastName;resident_firstName,resident_lastName;@+id/lastNameNew,@+id/firstNameNew]</code>
 
:; ⤷ <code>[gn:act_getRowValues]|[@+id/lstResidents;;resident_firstName,resident_lastName;@+id/firstName,@+id/lastName;resident_firstName,resident_lastName;@+id/lastNameNew,@+id/firstNameNew]</code>

Revision as of 12:03, 2 August 2017

gn:act_getRowValues

Description
Returns data from source which supports rows, rowsColumn first row to targets
Action returns
void

Action signatures

Get row values based on column values

[gn:act_getRowValues]|[source;;searchColumn{n};searchSource{n};column{n};target{n}]
Parameter Description
source source from where the row values will be retrieved
searchColumn{n} column where the value from searchSource{n} will be compared
searchSource{n} source from which the value will be compared with searchColumn value and if the row matches, row values will be retrieved
column{n} column from which the value from source{n} will be retrieved
target{n} target from which the value will be used to update the value of column{n}

Example

@+id/lstResidents - source
resident_firstName, resident_lastName - search column names
@+id/firstName, @+id/lastName - search source
resident_firstName, resident_lastName - value column names
@+id/firstName, @+id/lastName - target
[gn:act_getRowValues]|[@+id/lstResidents;;resident_firstName,resident_lastName;@+id/firstName,@+id/lastName;resident_firstName,resident_lastName;@+id/lastNameNew,@+id/firstNameNew]

Get row values based on row index

[gn:act_getRowValues]|[source,rowIndex;;;column{n};target{n}]
Parameter Description
source source from where the row values will be retrieved
rowIndex
optional

source which represents the row index in target where the row will be removed

column{n} column from which the value from source{n} will be retrieved
target{n} target from which the value will be used to update the value of column{n}

Example

@+id/lstResidents - source
@variable/rowIndex - row index
resident_firstName, resident_lastName - value column names
@+id/firstName, @+id/lastName - target
[gn:act_getRowValues]|[@+id/lstResidents,@variable/rowIndex;;;resident_firstName,resident_lastName;@+id/lastNameNew,@+id/firstNameNew]