From wiki.ginstr.com
Revision as of 16:32, 12 July 2017 by Mark (talk | contribs) (formatting)
Jump to: navigation, search

gn:act_updateRow

Description
Updates a row by defined column values or specified index on target which supports rows, rowsColumn
Action returns
void

Action signatures

Update row based on column values

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

Example

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

Update row based on row index

[gn:act_updateRow]|[target,rowIndex;;;column{n};source{n}]
Parameter Description
target target where the row will be updated
rowIndex
optional

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

column{n} column where the value from source{n} will be updated
source{n} source from which the value will be used to update the value of column{n}

Example

@+id/lstResidents - target
@variable/rowIndex - row index
resident_firstName,resident_lastName - updated column names
@+id/lastNameNew,@+id/firstNameNew - update value source
[gn:act_updateRow]|[@+id/lstResidents,@variable/rowIndex;;;resident_firstName,resident_lastName;@+id/lastNameTest,@+id/firstNameTest]