ddAppendIndexedColumnResultSet

This function loads a dynamicdata table into a result set. It is very similar to ddLoadIndexedColumnResultSet. The main difference is that if the Idoc Script result set already exists, the new result set created from the dynamicdata table is appended to it. Any fields found in the dynamicdata table, but not in the target result set, are automatically added.

Type and Usage

Parameters

The following table lists parameters for this function.

Parameters Description
dataTableName The name of the dynamicdata table to load.
idocTableName The name of the result set into which the dynamicdata table should be appended.
indexColumn The name of an indexed column in the dynamicdata table.
indexValue The value to use to select a section of the original table. This value will be checked in a case-insensitive manner against the indexColumn in each row. If it matches, that row is loaded into the result set; otherwise it is skipped.
mappingTableName The name of a dynamicdata table used to rename the columns of the final result set. The renaming is done by mapping the column names in the specified mapping table to the values of the first row in the same table. This is done exactly the same in ddLoadResultSet.

Output

If the dynamicdata table is successfully loaded, it returns True.

Example

<@dynamicdata MyDataTable@><?commatable indexedColumns="fieldA"?>fieldA, fieldB, fieldC1,      2,       34,      5,       61,      3,       9<@end@>


<$exec rsCreateResultSet("MyResultSet", "fieldA,fieldB")$><$exec rsAppendNewRow("MyResultSet")$><$MyResultSet.fieldA = "first value"$><$MyResultSet.fieldB = "second value"$><$exec ddLoadIndexedColumnResultSet("MyDataTable", "MyResultSet", "fieldA", "1")$><$exec rsFirst("MyResultSet")$><$foo = MyResultSet.fieldB$>    [[% (foo == 'second value') %]]<$exec rsNext("MyResultSet")$><$bar = MyResultSet.fieldC$>    [[% (bar == '3') %]]

See Also