Select

Create Dropdown from Select command

 

 

The SQL-Command is executing while create the dropdown-list

The SQL statement is executed directly before the dropdown window is displayed. Placeholder for WHERE condition are possible

The first select field is always returned to the input field

 

Best place to define is

global function form_opened
// definnition
end global

 

if result related to another field, which the use can change, then the best place is the event "click on dropodown icon of the field", example for udf1:

global function dw_1_item_udf1_p_click
// definition
end global

 
Example::

global function form_opened

dw_1.item.udf1.dropdown.select "OITM"."ItemCode" from "OITM" order by "OITM"."ItemCode"

end global

 

dropdownselect1field

 

With 2 values

global function form_opened

dw_1.item.udf1.dropdown.select "OITM"."ItemCode","ItemName" from "OITM" order by "OITM"."ItemCode"

end global

dropdownselect2fields

 

Return informations

All other fields saved in variables: dd:[fieldname]

Example: If you choose "B_RM" in this dropdown, then beas create follow variables:

dd:itemcode = "B_RM"

dd:itemname = "Raw Material / Normal"

 

Field Width

The size of field with is calculated automatically

If you define a field name with post fix "__Number" you can change the field width

 

Example: You want to see only Description, but you want tot return the itemcode

You can change the width to 1 pxl (0 is not allowed)

dw_1.item.udf1.dropdown.select "OITM"."ItemCode" as i__1,"ItemName" from "OITM" order by "OITM"."ItemCode"

 

dropdownselectwidth1

 

Note: You change the width and the name of return value
In this case the itemcode is saved in variable dd:i__1

 

Pre defined Dropdowns

You can work with pre defined Select commands.
With Comma separator you can define additional properties

 

item.mycolumn.dropdown.select select:oitm<tab>ddfilter="OITM"."Descrption" like "*grp*"

 

See list of pre defined dropdowns:

 

Formated Dropdowns

You can set the format in the dropdown window, example set title, color and many more properties

dropdownformat

 

See dropdown-sql-format