User's Guide > About the User's Guide > Word and Excel Templates > Word Templates in CB 7.2 - 9.2 > How to Access Choice or Reference Fields Inside Tables from Word Export
How to Access Choice or Reference Fields Inside Tables from Word Export
Here is an pseudo-code, not-working and has not been tested yet.


resolver = TrackerItemFieldHandler.getInstance(user);

// item is the issue/bug being rendered

field = resolver.getItemFieldByName(item, "field-name");

// the rawvalue contains the cell's raw value

value = resolver.decodeString(field, rawvalue);

An alternative code of this is to use TableFields class something like this:


tableFields = new com.intland.codebeamer.manager.trackeritems.TableFields(user, item, applicationContext)

table = tableFields.getTableByName("...table field's name")

column = table.getTableColumnByName("...column name")



rows = table.getNumRows()

for (int row=0; row<rows; row++) {

Object value = column.getConvertedValue(row);

// print out value...

}

Was this helpful?