Creating UD User Defined Lookups
UD User Defined Lookups creates custom F4 lookups — windows that show valid data for a field, usually for fields that require a value from a specific table (examples: Vendor/APVM, Job/JCJM, Phase/JCPM). After you create a lookup, assign it with F3. One or more lookups can be assigned to a field. Clauses are data filters. Form help: About the UD User Defined Lookups Form. Procedure: Create a Custom Lookup. There is no help slug creating-ud-user-defined-lookups. You can also copy a standard lookup and modify it (Copying a Lookup).
Before you start
- Identify the source table: F3 on a field and note View (the From Clause table).
- Decide which columns will display in the lookup grid.
- Identify the calling table/form (F3 again).
- Note Field Seq # on each calling-form field used in the Where Clause; those numbers are used when assigning the lookup.
- For complex clauses, Trimble points you to your system administrator; published clause topics are basic only.
Steps
- Open UD User Defined Lookups.
- Lookup: up to 28 characters, no spaces. Field defs: enter without the prefix (example
CompanyVehicles); after tab-off Vista addsud(udCompanyVehicles). Procedure step 5 says the name must begin withud. Prefer entering the short name and letting the system addud, and includeudyourself when typing user-table names by hand in From Clause. - Title: up to 30 characters (spaces OK); shown when the lookup opens.
- Build clauses:
- From Clause: main table. F4 lists tables; User Defined Table Name radio shows custom tables. Hand-typed user tables must include the
udprefix. Extra tables go in Join. Adding tables via F4/toolbar/menu to a single-table From Clause starts a wizard that converts From to SQL-92 (ANSI). - Where Clause: limits rows (example
JCPC.PhaseGroup=? and JCPC.Phase=?).?is replaced by parameters set in F3 when the lookup is used. No Where = all rows. - Join Clause: only if more than one table (example join JCPC to JCCT for description).
- GroupBy Clause: group by one or more columns when needed.
- From Clause: main table. F4 lists tables; User Defined Table Name radio shows custom tables. Hand-typed user tables must include the
- Optional Sort Descending (default off) and Order by Column (grid column sequence to pre-sort; default 0 because standard lookups start at 0). Clicking a header still sorts other columns.
- Optional Notes. Check Enable for Field Capture to use the lookup in Field View.
- Details tab — define columns:
- Seq#: 0–255 display order. Cannot change after add; delete the line and re-add. Standard sequences start at 0; any sequence is allowed for custom lookups.
- Column Name: valid column from From/Join tables (F4).
- Column Heading: F4 heading, up to 30 characters. Custom columns default from UD User Table and Form Setup; may be overridden.
- Hidden: hide columns used only for sort/filter (example Vendor SortName).
- Datatype: defaults to the Vista datatype. Override is allowed but not recommended; datatype drives Input Type, Mask, Length, and Precision.
- Assign the lookup to the field (Assigning a Lookup to a Field / F3 Field Properties).
Hard rules
- No spaces in Lookup name; 28-character limit.
- Seq# is immutable once added.
- Do not override Datatype lightly.
- Prefix story differs between procedure (
udrequired up front) and field defs (system addsudafter tab-off). - F3 is called Field Properties on the form page and Form Properties in Where Clause / procedure text.
Notes
- Related: Create a Custom Lookup; Define Lookup Columns; Assign a Lookup to a Field; Copying a Lookup; About the UD User Lookups Copy Form; F4 Lookup (User Interface Guide); Additional Lookups (Reports setup); Set the Maximum Number of Records for Lookups; UD User Table and Form Setup.