From wiki.ginstr.com
Jump to: navigation, search
m (formatting)
Line 10: Line 10:
 
===Get row values based on column values===
 
===Get row values based on column values===
  
;<code>[gn:act_getRowValues]|[source;searchColumn{n};searchSource{n};column{n};target{n}]</code>
+
:;<code>[gn:act_getRowValues]|[source;searchColumn{n};searchSource{n};column{n};target{n}]</code>
  
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
+
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Parameter
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| [[source]]
+
| <code>[[source]]</code>
 
| [[source]] from where the row values will be retrieved
 
| [[source]] from where the row values will be retrieved
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
** [[Datatypes#rows|rows]]
+
** <code>[[Datatypes#rows|rows]]</code>
** [[Datatypes#rowsColumn|rowsColumn]]
+
** <code>[[Datatypes#rowsColumn|rowsColumn]]</code>
 
|-
 
|-
| [[configuration.xml#Column|searchColumn]]{n}
+
| <code>[[configuration.xml#Column|searchColumn]]{n}</code>
| [[configuration.xml#Column|searchColumn]] where the value from [[source|searchSource]]{n} will be compared  
+
| [[configuration.xml#Column|column]] where the value from <code>[[source|searchSource]]{n}</code> will be compared  
 
|-
 
|-
| [[source|searchSource]]{n}
+
| <code>[[source|searchSource]]{n}</code>
| [[source|searchSource]] from which the value will be compared with [[configuration.xml#Column|searchColumn]] value and if the row matches, row values will be retrieved
+
| [[source]] from which the value will be compared with <code>[[configuration.xml#Column|searchColumn]]</code> value and if the row matches, row values will be retrieved
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
** [[Datatypes#text|text]]
+
** <code>[[Datatypes#text|text]]</code>
 
|-
 
|-
| [[configuration.xml#Column|column]]{n}
+
| <code>[[configuration.xml#Column|column]]{n}</code>
| [[configuration.xml#Column|column]] from which the value from [[source]]{n} will be retrieved
+
| [[configuration.xml#Column|column]] from which the value from <code>[[source]]{n}</code> will be retrieved
 
|-
 
|-
| [[target]]{n}
+
| <code>[[target]]{n}</code>
 
| [[target]] from which the value will be used to update the value of [[configuration.xml#Column|column]]{n}
 
| [[target]] from which the value will be used to update the value of [[configuration.xml#Column|column]]{n}
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
Line 41: Line 41:
  
 
====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>1: 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>2: resident_firstName, resident_lastName</code> - value column names<br>
<code>@+id/firstName, @+id/lastName</code> - target<br><br>
+
:<code>@+id/firstName, @+id/lastName</code> - target<br>
<code>[gn:act_updateRow]|[@+id/lstResidents;resident_firstName,resident_lastName;@+id/firstName,@+id/lastName;resident_firstName,resident_lastName;@+id/lastNameNew,@+id/firstNameNew]</code>
+
:; ⤷ <code>[gn:act_updateRow]|[@+id/lstResidents;resident_firstName,resident_lastName;@+id/firstName,@+id/lastName;resident_firstName,resident_lastName;@+id/lastNameNew,@+id/firstNameNew]</code>
 
<hr>
 
<hr>
  
Line 52: Line 52:
 
===Get row values based on row index===
 
===Get row values based on row index===
  
;<code>[gn:act_getRowValues]|[source,rowIndex;;;column{n};target{n}]</code>
+
:;<code>[gn:act_getRowValues]|[source,rowIndex;;;column{n};target{n}]</code>
  
{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
+
:{| class="wikitable sortable" style="font-size: 85%; text-align: left;"
 
|-
 
|-
 
! scope="col" | Parameter
 
! scope="col" | Parameter
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| [[source]]
+
| <code>[[source]]</code>
 
| [[source]] from where the row values will be retrieved
 
| [[source]] from where the row values will be retrieved
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
** [[Datatypes#rows|rows]]
+
** <code>[[Datatypes#rows|rows]]</code>
** [[Datatypes#rowsColumn|rowsColumn]]
+
** <code>[[Datatypes#rowsColumn|rowsColumn]]</code>
 
|-
 
|-
| rowIndex
+
| <code>rowIndex</code>
| <div style="text-align: right;">'''optional'''</div>
+
| <div style="text-align: right; background-color: #e5e5e5; padding-right: 7px">'''optional'''</div>
 
[[source]] which represents the row index in [[target|target]] where the row will be removed
 
[[source]] which represents the row index in [[target|target]] where the row will be removed
  
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
** [[Datatypes#number|number]]
+
** <code>[[Datatypes#number|number]]</code>
 
|-
 
|-
 
| [[configuration.xml#Column|column]]{n}
 
| [[configuration.xml#Column|column]]{n}
| [[configuration.xml#Column|column]] from which the value from [[source]]{n} will be retrieved
+
| [[configuration.xml#Column|column]] from which the value from <code>[[source]]{n}</code> will be retrieved
 
|-
 
|-
| [[target]]{n}
+
| <code>[[target]]{n}</code>
| [[target]] from which the value will be used to update the value of [[configuration.xml#Column|column]]{n}
+
| [[target]] from which the value will be used to update the value of <code>[[configuration.xml#Column|column]]{n}</code>
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
 
** any [[target]]
 
** any [[target]]
Line 82: Line 82:
  
 
====Example====
 
====Example====
<code>@+id/lstResidents</code> - source<br>
+
:<code>@+id/lstResidents</code> - source<br>
<code>@variable/rowIndex</code> - row index<br>
+
:<code>@variable/rowIndex</code> - row index<br>
<code>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><br>
+
:<code>@+id/firstName, @+id/lastName</code> - target<br>
<code>[gn:act_updateRow]|[@+id/lstResidents,@variable/rowIndex;;;resident_firstName,resident_lastName;@+id/lastNameNew,@+id/firstNameNew]</code>
+
:; ⤷ <code>[gn:act_updateRow]|[@+id/lstResidents,@variable/rowIndex;;;resident_firstName,resident_lastName;@+id/lastNameNew,@+id/firstNameNew]</code>
 
<hr>
 
<hr>

Revision as of 16:35, 12 July 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
1: resident_firstName, resident_lastName - search column names
@+id/firstName, @+id/lastName - search source
2: resident_firstName, resident_lastName - value column names
@+id/firstName, @+id/lastName - target
[gn:act_updateRow]|[@+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_updateRow]|[@+id/lstResidents,@variable/rowIndex;;;resident_firstName,resident_lastName;@+id/lastNameNew,@+id/firstNameNew]