Hello All

I have created a simple dialog component with a drop down box (as shown below in the code):

dim tmpl as p
tmpl.ComponentName = "LookupCaseID"
tmpl.ComponentType = "Dialog"
tmpl.PreCalcMode = "Standard"
tmpl.GUID = "aaadc162-f8b4-4a0d-92be-2cc7362ca2a1"

tmpl.style_name = "Corporate"
tmpl.flagUseSimpleStyles = .f.
tmpl.show_row_labels = .t.
tmpl.fontsize = "Medium"
tmpl.LayoutColumns = 1
tmpl.Position_Field_Error_Messages = "Form Header"
tmpl.SecurityModel = "Group Based"
tmpl.has_submit_button = .f.
tmpl.submit_button_label = "Submit"
tmpl.submit_button_inlinestyle = ""
tmpl.has_reset_button = .f.
tmpl.Reset_button_label = "Reset"
tmpl.Reset_button_inlinestyle = ""
tmpl.button_alignment = "Right"
tmpl.EditRegion.Dialog.Top = <<%txt%
%txt%
tmpl.EditRegion.Dialog.Bottom = <<%txt%
%txt%
tmpl.EditRegion.Dialog.Left = <<%txt%
%txt%
tmpl.EditRegion.Dialog.Right = <<%txt%
%txt%
tmpl.ValidateBeforeSubmit = .f.
tmpl.Declarations = ""
tmpl.events.Initialize = ""
tmpl.events.Activate = ""
tmpl.events.Validate = ""
tmpl.events.AfterValidate = ""
tmpl.fields = 1
DIM tmpl.Variable_Info[tmpl.fields] as P
with tmpl.Variable_Info[1]
.Fieldname = "DropDownBoxCaseID"
.Scope = "Global"
.DisplayFormat = ""
.DisplayUnFormat = ""
.Type = "C"
.Varname = "DROPDOWNBOX0"
.Column.LabelPosition = "Left"
.Controltype = "DropDownBox"
.DropdownBox.InLineStyle = ""
.DropdownBox.Type = "Dynamic"
.DropdownBox.StyleFieldIfError = .t.
.DropdownBox.ErrorInLineStyle = ""
.DropdownBox.Size = 1
.DropdownBox.selectStyle = "Single"
.DropdownBox.NotInListRule = "Add To List if Not Null"
.DropDownBox.Datasource = "CS"
.DropDownBox.maxchoices = 0
.DropDownBox.CS.ConnectionString = "::name::Connection2"
.DropDownBox.CS.SQL = "SELECT dbo_Case.ID FROM dbo.[Case] dbo_Case"
.InitialValue = ""
.BreakType = "None"
.nCols = 1
.Column.Hide = .f.
.Column.Heading = "Case ID"
end with



I need to pull the currently selected value from this drop down list into a text box which has been inserted on the same a5w page. Can anyone please assist me with the syntax of how I write the code. My guess is I need to reference the dialog component name/dropdown list name/current value, but have no idea how to approach this in code?

Many thanks

Jason