====== addIndexItemObject ====== ~~NOTOC~~ **From Version 5.21.0-beta-2** == See Also == [[v5:dictionary:structure:introduction|Structured Schema Management]]\\ [[v5:dictionary:structure:addindexobject|Index Object Creation]]\\ == Syntax == obj addIndexItemObject( string $indexName, string $columnName, optional string $platform='' ) The method ''addIndexItemObject()'' is part of the **//Structured Schema Management//** suite, and adds an index item to the current [[v5:dictionary:structure:addindexobject|Index]] object. -------------------------------- ===== Parameters ===== ==== $indexName ==== The index name must be the name of a previously defined [[v5:dictionary:structure:addindexobject|index]] object. ==== $columnName ==== The column name must be the name of a previously defined [[v5:dictionary:structure:addcolumnobject|column]] object. ==== $platform ==== The platform parameter can be any parameter recognized by the [[v5:dictionary:structure:platform|Platform]] keyword. If provided, the column would not be added to any platform that did not match the value provided. ===== Usage ===== In the following example, a table **//employees//** is to be created. The table has 2 columns, COL1 and COL2 and an index COL1-IDX will be created, holding COL1 and COL2. $t = new metaObjectStructure($dict,'employees'); $t->addColumnObject('COL1','I'); $t->addColumnObject('COL2','C(60)'); $i = $t->addIndexObject('COL1-IDX'); $i->addIndexItemObject('COL1-IDX','COL1') $i->addIndexItemObject('COL1-IDX','COL2')