Monday 22 November 2021

nuBuilder Objects that can be used for choosing values from a list

 Often when using an Edit Form the user needs to pick a value from a list.

Sometimes this can be from a static list or from a list that may need to be added to.

These are the nuBuilder Objects that can be used to do this.

  • Input : nuScroll
  • Lookup
  • Select




Each of these is ideal in different situations.


Input : nuScroll

This Object allows the User to select from an array by scrolling up or down using the keyboard's up and down arrows but also allows the User to type in a value not contained in the array.



Lookup

A Lookup Object allows the User to select from a list of values that come from another Form's Browse Form.
A Lookup is ideal when then the list is large (up to thousands of records) because it allows the User to filter these records to find the one they are looking for and even add a new record to this Lookup's Form if a new option is needed.
A Lookup also allows 2 ways of selecting a record by...
  • Typing a unique code that will automatically populate the Lookup field.
  • Clicking the magnifying glass to the left of the code field and selecting the required record from a Browse Form.
The Lookup Object can also display another value from the selected record to the right of the magnifying glass (typically a description).

Once the desired record is selected a Lookup Object can run custom PHP (After Browse) on the server and then Javascript on the current Edit Form.




Select

The Select Object allows a list to be created 2 different ways.

  • SQL - A valid SQL query that returns 2 columns - If you want any help building SQL, the SQL Button will direct you to nuBuilder's SQL Builder.
  • List - A list delimited by a |         eg. 0|No|1|Yes|2|Maybe

The first item is the bound value (e.g. 1) that is stored in the database and the second one is the display value (e.g. Yes)

A Select Object can also allow for the selection of more than 1 choice from a list.