dropdown Select

beasscript-logo-small

BS: Create Drop-down from Select command.

 

 

The SQL-Command is executing while create the drop-down-list

The SQL statement is executed directly before the drop-down window is displayed. Placeholder for WHERE condition is 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 information

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

Example: If you choose "B_RM" in this drop-down, Beas creates the following 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 Drop-downs

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:

 

Formatted Drop-downs

You can set the format in the drop-down window, example set title, color and many more properties.

dropdownformat

 

See dropdown-sql-format