From wiki.ginstr.com
Jump to: navigation, search
(Example)
(Inserts new row at defined rowIndex in the list)
 
(14 intermediate revisions by 2 users not shown)
Line 10: Line 10:
 
===Inserts new row as the last element in the list===
 
===Inserts new row as the last element in the list===
  
;<code>[gn:act_addRow]|[target;column{n};source{n}]</code>
+
:;<code>[gn:act_addRow]|[target;column{n};source{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
 
|-
 
|-
| [[target]]
+
| <code>[[target]]</code>
 
| [[target]] where the row will be stored  
 
| [[target]] where the row will be stored  
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
** any [[target]] which support [[Datatypes#rows|rows]], [[Datatypes#rowColumns|rowColumns]], [[Datatypes#email|email]]
+
** <code>[[Datatypes#rows|rows]]</code>
 +
** <code>[[Datatypes#rowsColumn|rowsColumn]]</code>
 +
** <code>[[Datatypes#email|email]]</code>
 +
** <code>[[Datatypes#assignment|assignment]]</code>
 +
** <code>[[Datatypes#documents|documents]]</code>
 +
** <code>[[Datatypes#pictures|pictures]]</code>
 +
** <code>[[Datatypes#signature|signature]]</code>
 
|-
 
|-
| [[column]]{n}
+
| <code>[[configuration.xml#Column|column]]{n}</code>
| [[column]] where the [[source]] value will be stored  
+
| [[configuration.xml#Column|column]] where the [[source]] value will be stored  
 
|-
 
|-
| [[source]]{n}
+
| <code>[[source]]{n}</code>
| [[source]] from which value for [[column]] will be taken
+
| [[source]] from which value for [[configuration.xml#Column|column]] will be taken
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
** any [[source]] which support [[DtText]]  
+
** <code>[[Datatypes#text|text]]</code>
 
|-
 
|-
 
|}
 
|}
  
 
====Example====
 
====Example====
<code>@variable/newEmailDTVariable</code> - [[Variables#Variable_definition|variable]] [[Datatypes#email|email]]<br>
+
:<code>@variable/newEmailDTVariable</code> - target<br>
<code>name, email</code> - internal [[DtEmailAddress|email]] DT columns<br>
+
:<code>name, email</code> - column names<br>
<code>@variable/supervisorFirstName, @variable/supervisorEmail</code> - [[Variables#Variable_definition|variable]] [[Datatypes#text|text]]<br><br>
+
:<code>@variable/supervisorFirstName, @variable/supervisorEmail</code> - source<br>
<code>[gn:act_addRow]|[@variable/newEmailDTVariable;name,email;@variable/supervisorFirstName,@variable/supervisorEmail]</code>
+
:; ⤷ <code>[gn:act_addRow]|[@variable/newEmailDTVariable;name, email;@variable/supervisorFirstName, @variable/supervisorEmail]</code>
 +
<hr>
  
 
===Inserts new row at defined <code>rowIndex</code> in the list===
 
===Inserts new row at defined <code>rowIndex</code> in the list===
 
   
 
   
;<code>[gn:act_addRow]|[target,rowIndex;column{n};source{n}]</code>
+
:;<code>[gn:act_addRow]|[target,rowIndex;column{n};source{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
 
|-
 
|-
| [[target]]
+
| <code>[[target]]</code>
 
| [[target]] where the row will be stored  
 
| [[target]] where the row will be stored  
 
* Valid [[target|targets]]:
 
* Valid [[target|targets]]:
** any [[target]] which support [[Datatypes#rows|rows]], [[Datatypes#rowColumns|rowColumns]], [[Datatypes#email|email]]
+
** <code>[[Datatypes#rows|rows]]</code>
 +
** <code>[[Datatypes#rowsColumn|rowsColumn]]</code>
 +
** <code>[[Datatypes#email|email]]</code>
 +
** <code>[[Datatypes#assignment|assignment]]</code>
 +
** <code>[[Datatypes#documents|documents]]</code>
 +
** <code>[[Datatypes#pictures|pictures]]</code>
 +
** <code>[[Datatypes#signature|signature]]</code>
 
|-
 
|-
| [[column]]{n}
+
| <code>[[configuration.xml#Column|column]]{n}</code>
| [[column]] where the [[source]] value will be stored  
+
| [[configuration.xml#Column|column]] where the [[source]] value will be stored  
 
|-
 
|-
| [[source]]{n}
+
| <code>[[source]]{n}</code>
| [[source]] from which value for [[column]] will be taken
+
| [[source]] from which value for [[configuration.xml#Column|column]] will be taken
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
** any [[source]] which support [[DtText]]
+
** <code>[[Datatypes#text|text]]</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 new row will be stored
 
[[source]] which represents the row index in [[target|target]] where new row will be stored
  
 
* Valid [[source|sources]]:
 
* Valid [[source|sources]]:
** any [[source]] which support [[DtNumber]]
+
** <code>[[Datatypes#number|number]]</code>
 
|-
 
|-
 
|}
 
|}
  
 
====Example====
 
====Example====
<code>@variable/newEmailDTVariable</code> - [[Variables#Variable_definition|variable]] [[Datatypes#email|email]]<br>
+
:<code>@variable/newEmailDTVariable</code> - target<br>
<code>@variable/rowIndex</code> - [[Variables#Variable_definition|variable]] [[Datatypes#number|number]]<br>
+
:<code>@variable/rowIndex</code> - row index<br>
<code>name, email</code> - internal [[DtEmailAddress|email]] DT columns<br>
+
:<code>name, email</code> - column names<br>
<code>@variable/supervisorFirstName, @variable/supervisorEmail</code> - [[Variables#Variable_definition|variable]] [[Datatypes#text|text]]<br><br>
+
:<code>@variable/supervisorFirstName, @variable/supervisorEmail</code> - source<br>
<code>[gn:act_addRow]|[@variable/newEmailDTVariable,@variable/rowIndex;name,email;@variable/supervisorFirstName,@variable/supervisorEmail]</code>
+
:; ⤷ <code>[gn:act_addRow]|[@variable/newEmailDTVariable, @variable/rowIndex;name, email;@variable/supervisorFirstName, @variable/supervisorEmail]</code>
 +
<hr>

Latest revision as of 15:29, 8 August 2019

gn:act_addRow

Description
Creates new row in list typed widget or variable, with data from sources
Action returns
void

Action signatures

Inserts new row as the last element in the list

[gn:act_addRow]|[target;column{n};source{n}]
Parameter Description
target target where the row will be stored
column{n} column where the source value will be stored
source{n} source from which value for column will be taken

Example

@variable/newEmailDTVariable - target
name, email - column names
@variable/supervisorFirstName, @variable/supervisorEmail - source
[gn:act_addRow]|[@variable/newEmailDTVariable;name, email;@variable/supervisorFirstName, @variable/supervisorEmail]

Inserts new row at defined rowIndex in the list

[gn:act_addRow]|[target,rowIndex;column{n};source{n}]
Parameter Description
target target where the row will be stored
column{n} column where the source value will be stored
source{n} source from which value for column will be taken
rowIndex
optional

source which represents the row index in target where new row will be stored

Example

@variable/newEmailDTVariable - target
@variable/rowIndex - row index
name, email - column names
@variable/supervisorFirstName, @variable/supervisorEmail - source
[gn:act_addRow]|[@variable/newEmailDTVariable, @variable/rowIndex;name, email;@variable/supervisorFirstName, @variable/supervisorEmail]