MoneyWorks Manual
GetUIField (windowID, 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.
In v9 and later, the windowID can be the symbolic identifier for the window (e.g. "F_TIMESHEET"). In earlier versions, the windowID had to be numeric, and the numeric IDs were not documented.
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("F_TRANS", `E_NAME`)
To filter product choices for the timesheet to only show products that are budgetted for the job:
[Jobsheet:job=GetUIField("F_TIMESHEET", "E_CODE") and status="BU"][product]
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).