Please enable JavaScript to view this site.

Process Designer

Navigation: PHP API > Work with Subtables

Write subtable values (setSubtableValue)

Scroll Prev Top Next More

This function allows you to change a value of a cell in the subtable. If there is no row for the entered ID, it will be created.

Parameter

Type

Description

$subtable

string

Subtable name

$row

int

Row ID

$fieldName

string

Column name

$value

mixed

New value

The parameter value has to be passed differently depending on the type of the subtable 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 subtable values within a form function, you have to call the save() method in addition to this function to write data into the table during step processing.

Example:

$this->setSubtableValue('INVOICE ITEMS',5, 'MATERIAL','12345');