This is an excellent function found in standard program which shows the enum / set options on a field when called in before.zoom section of a field .
PHP Code:
function extern long get_enum_value(
const string dom_name(),
long type,
ref string descr())
where dom_name = set or enum domain
type = db.enum or db.bitset
descr - enum description
Return value is the database value of the selection .
If it is called before.zoom section of string field with appropriate arguments , attr.zoomcode is set to 0 in same section , it can give the impact of enum/set entry just like standard program .
One can use rdi functions like RDI.COLUMN, RDI.DOMAIN , RDI.DOMAIN.ENUM ,RDI.DOMAIN.ENUM.VALUE , RDI.DOMAIN.SET, RDI.DOMAIN.SET.VALUE along with enum functions like etol() ,ltoe() and enum.descr$() in important field sections (like beore.display , before.input , after.input , when.field.changes etc ) to get a same feeling of entering data in enum field itself and storing the same in backend database consistently .