GetUIField (windowNumericID, fieldname)

Result Type:  Text

Definition:  Gets the value out of a user-interface field. Useful for context-sensitive filter functions such as "products the purchase's supplier sells”. See GetFieldName for details on how to get field names. The Window numeric IDs required to identify the class of window are not documented.

Known bug:   May not access the topmost matching window for the given windowNumericID.

Examples:  When you are entering a purchase order, you may want the product list to display only the products supplied by the supplier on whom the order is being placed. This involves a filter for the product choices list which needs to get the supplier code out of the open transaction window.

Search Expr (for They Supply item choices filter): Supplier = GetUIField(20745, `E_NAME`)

See Also:  GetFieldValue is preferred for scripts. GetFieldValue takes a windowRef and a symbolic or numeric field id. However, GetUIField can be used from ordinary expressions (whereas GetFieldValue is only available in scripts).