Here is the code snippet for converting enum value to string with the help of my colleague Danish
publicstaticserverstr genderString()
{
tableName viewName = identifierStr(HcmWorkerInfoView_TYL);
DictEnum dictEnum = new DictEnum(enumNum(HcmPersonGender));
Map enumValues = new Map(Types::String, Types::String);
int n;
for (n = 0; n < dictEnum.values(); n++)
{
enumValues.insert(int2str(dictEnum.index2Value(n)), SysComputedColumn::returnLiteral(dictEnum.index2Symbol(n)));
}
return SysComputedColumn::switch( SysComputedColumn::returnField( viewName, identifierStr(PrivateDetais), fieldStr(HcmPersonPrivateDetails, Gender)), enumValues, SysComputedColumn::returnLiteral(dictEnum.index2Symbol(n)));
}
