{
UUID referenceId = data.getSingleReference(fieldId);
if(referenceId == null)
return null;
String[] referTitleArray = new DataAccessSessionMySQL().queryFieldByIds(new UUID[]{referenceId}, "title", templateId);
if(referTitleArray != null && referTitleArray.length > 0)
return "[" + referTitleArray[0] + "]";
}
else if(field.getDataType().equals(Field.DataType.dt_multiple))
{
UUID[] referenceIdArray = data.getMultiReference(fieldId);
if(referenceIdArray == null || referenceIdArray.length == 0)
return null;
StringBuffer valueStrb = new StringBuffer();
String[] referTitleArray = new DataAccessSessionMySQL().queryFieldByIds(referenceIdArray, "title", templateId);
for(String title : referTitleArray)
{
if(title == null)
continue;