Understanding #EFLD in Omnis Classic

A powerful and underused feature for generic field handling in Omnis 7 / Omnis Classic.

What is #EFLD?

#EFLD is a read-only field reference variable in Omnis Classic that holds a reference to the current data entry field. It is equivalent to Fld(#EN) but is more efficient.


How is #EFLD Different from #EN?

Feature#EN#EFLD
TypeString (field name)Field reference (object)
UsageIdentificationDirect access to field contents
Equivalentn/aFld(#EN) (but more efficient)
When UsefulGeneral field trackingGeneric or high-performance logic

Examples

1. Modify current field value

Calculate #EFLD as "Default value"

2. Set the current list based on the list field in focus (safe version)

If type(#EFLD) = kList
  Set current list #EFLD
End If

3. Conditional logic based on user input

If #AFTER & (dat(#EFLD) = #D)
  OK message {User has entered today's date}
End If

Notes


Summary

If you’re writing reusable procedures or need to track what the user is doing without hardcoding field names, #EFLD is the safest and cleanest way to interact with the current field object in Omnis Classic.

Pro tip: It’s obscure, but officially documented in older Omnis 7 manuals — it’s not a myth!