return odiResult.getCurrentResult( ) .getFieldValue( name );
{ try { return DataTypeUtil.convert(odiResult.getCurrentResult( ) .getFieldValue( name ),colref.getDataType()); } catch (BirtException e) { throw DataException.wrap(e); } }
	public static Object evaluateCompiledExpression( CompiledExpression expr,			IResultIterator odiResult, Scriptable scope ) throws DataException	{		// Special case for DirectColRefExpr: it's faster to directly access		// column value using the Odi IResultIterator.		if ( expr instanceof ColumnReferenceExpression )		{			// Direct column reference			ColumnReferenceExpression colref = (ColumnReferenceExpression) expr;			if ( colref.isIndexed( ) )			{				int idx = colref.getColumnindex( );				// Special case: row[0] refers to internal rowID				if ( idx == 0 )					return new Integer( odiResult.getCurrentResultIndex( ) );				else if ( odiResult.getCurrentResult( ) != null )					return odiResult.getCurrentResult( )							.getFieldValue( idx );				else					return null;			}			else			{				String name = colref.getColumnName( );				// Special case: row._rowPosition refers to internal rowID				if ( JSRowObject.ROW_POSITION.equals( name ) )					return new Integer( odiResult.getCurrentResultIndex( ) );				else if ( odiResult.getCurrentResult( ) != null )					return odiResult.getCurrentResult( )							.getFieldValue( name );				else					return null;			}		}		else		{			Context cx = Context.enter();			try			{				return  expr.evaluate( cx, scope );			}			finally			{				Context.exit();			}		}	}