Hi,
I made an xDilog form with an Action script which is working fine.
Now I modified it for Display data with current table records.
My problem is the when I want to change the current data in the drop-down box, the drop-down box does not display the "Key_list".
* My Procedure case
(1) Remained the "Series" and Change only the "Shape" or
(2) Change to new "Series" and "Shape" in order to get the Product_id.
my current Event script did not work with neither one of the above case.
Does anyone know how to make the event condition?
I made an xDilog form with an Action script which is working fine.
Now I modified it for Display data with current table records.
My problem is the when I want to change the current data in the drop-down box, the drop-down box does not display the "Key_list".
* My Procedure case
(1) Remained the "Series" and Change only the "Shape" or
(2) Change to new "Series" and "Shape" in order to get the Product_id.
my current Event script did not work with neither one of the above case.
Does anyone know how to make the event condition?
Code:
'Create an XDialog dialog box to prompt for parameters. dim tInstall as p dim shared vEstHdId as c DIM SHARED vLineNo as C DIM SHARED vEstQty as N DIM SHARED vSeries as C DIM SHARED vShape as C DIM SHARED vSurface as C DIM SHARED vGroup as C DIM SHARED vVendor as C DIM SHARED vInstall_edit as C dim shared vSeriesVndr as c 'Get current Record tInstall = table.get("est_install") tinstall.fetch_goto(vBreck) vEstHdId = tInstall.Esthd_id vEstQty = tInstall.Head_qty vSeries = tInstall.Series_id vShape = tInstall.Shape_id vSurface = tInstall.Surface_id vGroup = tInstall.Price_group vSeriesVndr = tInstall.Vendor_id vVendor = lookup("SeriesVndrs","Seriesvndr_id="+quote(vSeriesVndr),"Vendor_name") 'Start the xDlg form ok_button_label = "&OK" cancel_button_label = "&Cancel" DIM vSeries_list as C vSeries_list = "k=series,{keylist_build(\"H=.05,1:25[Series Name]\",''+Series_id,left(''+Series_name,25))}{Cost_class = \"indirect\"}" DIM vSeries_def as C vSeries_def = replace_parameters(vSeries_list,local_variables()) DIM vShape_list as C vShape_list = "k=prdct_queue,{keylist_build(\"H=.05,1:25[Shape_Id],2:10[Surface],3:8[Group],4:18[Vendor],5:50[Description]\",''+Prdctgroup_id,left(''+Shape_id,25),left(''+Surface_id,10),left(''+Group,8),left(''+Vendor_name,15),left(''+xdescription,50))}{Series_id = [varC->vSeries]}" DIM vShape_def as C vShape_def = replace_parameters(vShape_list,local_variables()) vInstall_edit = ui_dlg_box("Edit Installation Itmes",<<%dlg% {region} Estimate ID:| [.25vEsthdid!vEsthdId_changed]; Install Item No:| [.10vLineNo]; Estimated Qty:| [%z%.15vEstQty!vEstQty_changed]; Series:| [%@vSeries_def%.25vSeries!vSeries_changed]; Shape:| [%@vShape_def%.25vShape!vshape_changed]; Surface:| [.10vSurface]; Group:| [.10vGroup]; Vendor:| [.20vVendor]; {endregion}; {line=1,0}; {region} <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL> {endregion}; %dlg%,<<%code% If a_dlg_button = "vEsthdId_changed" then vShape_def = replace_parameters(vShape_list,local_variables()) a_dlg_button = "" end if If a_dlg_button = "vLineno_changed" then vShape_def = replace_parameters(vShape_list,local_variables()) a_dlg_button = "" end if If a_dlg_button = "vEstQty_changed" then vShape_def = replace_parameters(vShape_list,local_variables()) a_dlg_button = "" end if If a_dlg_button = "vSeries_changed" then vShape_def = replace_parameters(vShape_list,local_variables()) a_dlg_button = "" end if If a_dlg_button = "vSeries" then vShape_def = replace_parameters(vShape_list,local_variables()) a_dlg_button = "" end if If a_dlg_button = "vShape_changed" then vShape_def = replace_parameters(vShape_list,local_variables()) a_dlg_button = "" end if If a_dlg_button = "vSeries" then vShape_def = replace_parameters(vShape_list,local_variables()) a_dlg_button = "" end if %code%)