A script-enabled browser is required for this page to function properly.

Managing LOVs and Record Groups

The column mappings on LOV and Record Forms objects are treated as child objects, so the JDAPI has classes representing the LOVColumnMapping and RecordGroupColumn types respectively. LOVColumnMapping objects do not have any further subdivisions, that is, they do not have rows or cells.

The individual "cells" for each column of a RecordGroupColumn are accessed by using a 1-based index on the RecordGroupColumn object itself (similar to list item elements). A row is in fact a set of cells at the same index for each column in the RecordGroup. This means that you must take care to create the same number of cells/rows for each column. For example:


...
// add and populate two new columns to the RecordGroup object rcg
RecordGroupColumn rc = new RecordGroupColumn(rcg, "FirstName");
rc.insertRow(1, "Winston");
rc.insertRow(2, "Franklin");
rc.insertRow(3, "Charles");

rc = new RecordGroupColumn(rcg, "LastName");
rc.insertRow(1, "Churchill");
rc.insertRow(2, "Roosevelt");
rc.insertRow(3, "deGaulle");

// now print them
JdapiIterator cols = rcg.getRecordGroupColumns();
while (cols.hasNext())
{
  RecordGroupColumn col = (RecordGroupColumn)cols.next();
  for (int i = 1; i <= rcg.getColumnValuesCount(); i++)
  {
    System.out.println(rgc.getRow(i));
  }
}