This function allows you to change the process table values.
Parameter |
Type |
Description |
|---|---|---|
$elementName |
string |
Name of the process table field |
$value |
mixed |
New value of the process table field |
The parameter value has to be passed differently depending on the type of the process table field:
Type |
Format |
Example |
|---|---|---|
Text |
As text |
Text … |
Integer |
As integer |
1000 |
Decimal |
As decimal |
1000.00 |
Attachment |
Use the function attachFile() |
- |
Long text |
As text |
Text … |
Date (DATETIME) |
Input: YYYY-MM-DD HH:MM:SS |
2012-01-20 12:23:45 |
Date (TIMESTAMP) |
Or as UNIX-Timestamp |
1330709994 |
The function does not return a value.
Please note: If you want to change process table values within a form function using this function, you have to add the save() method to write the data in the table while step processing.
Example:
…
// change text field
$this->setTableValue('NAME', 'JOHN SMITH');
// change numeric field
$this->setTableValue('NUMBER', 1000);
// change decimal field
$this->setTableValue('PRICE', 1000.12);
// change date
$this->setTableValue('DATE', '2012-01-20');
// change date and time
$this->setTableValue('DATE', '2012-01-20 12:34:20');
…