Lookup Field

Ribbon Lookup Field


Press the Lookup Field button on the ribbon bar.
Command Syntax
This is used to extract a single piece of data from a single row of the database. It displays the regular LOOP / Raw SQL dialogues with some extra controls:Lookup Field dialogue


Make sure the option Simple field lookup to variable is ticked.

Then select the field you want to lookup the value for from the droplist
.

Finally, type in or select a dynamic variable to save the value of the field to.
Note: You must be comfortable with using the LOOP command with criteria (WHERE clauses) to reduce the record set to one database row.

Please read up about LOOP's if you are unsure. A lookup field can also be generated from a raw SQL statement rather than a normal loop with WHERE criteria. A similar set of lookup field controls appear on the dialog when you ask to use raw SQL. Note, however, that the field list will be empty until you enter a valid SQL SELECT statement. The list is re-populated after a 2-second delay whenever you update the SQL.
Insert 
You must press Insert (or Update if editing an existing command) for your changes to be applied to the current script in the editor.