Hi All,
I attached this script for help. I used the Action Script and modified. I used the "Ui_msg_box" for checking my UDF whcih works fine.
My problems are
(1) Too slow to open it
(2) The calculation scripts are not working at all.
I can get the sized through UDF "Get_prdct_dimension"
(2-a) The vFieldQty, vBaseStrQty and vBullStrQty values are not recognized.
(2-b) The calculation result came out as "0" value.
How can I improve the speed and What did I miss on the calculation fields?
I attached this script for help. I used the Action Script and modified. I used the "Ui_msg_box" for checking my UDF whcih works fine.
My problems are
(1) Too slow to open it
(2) The calculation scripts are not working at all.
I can get the sized through UDF "Get_prdct_dimension"
(2-a) The vFieldQty, vBaseStrQty and vBullStrQty values are not recognized.
(2-b) The calculation result came out as "0" value.
Code:
FUNCTION EstCriteria_New_Manual AS C ( ) 'Step 1 -- Get 'Value' property of multiple objects in Form 'Estimate' . DIM vEsthdId AS c Dim vEstCritId as c DIM vProjectId AS c DIM vEstDate AS d DIM vSection AS c DIM vEstTotal AS n dim vEstFixUom as c vEsthdId = parentform:Esthd_id.value 'vEstCritId = varP_Object:EstCriteria_id.value 'I do not have this item on screen vProjectId = parentform:Project_id.value vEstDate = parentform:Modify_date.value vSection = alltrim(parentform:Section.value) vEstTotal = parentform:Total_qty.value 'Step 2 -- Create an XDialog dialog box to prompt for parameters. 'Area DIM vFieldCode as C ="" DIM vFieldVendor as C DIM vFieldQty as N 'Fixtures DIM vFixtCode as C DIM vFixtVndr as C dim vFixtQty as n dim vFixtUom as c 'Base dim vBaseType as c dim vRtbCode as c dim vFtbcode as c DIM vBaseCode as C dim vBaseVendor as c DIM vBaseStretch as C DIM vBaseOut as C DIM vBaseInside as C dim vBaseBfId as c dim vBaseStrQty as n dim vBaseOcQty as n dim vBaseIcQty as n dim vBaseBfQty as n dim vBaseConvQty as n 'Bullnose dim vBullType as c DIM vBullCode as C DIM vBullStretch as C DIM vBullOut as C DIM vBullInside as C dim vBullBfId as c dim vBullStrQty as n dim vBullOcQty as n dim vBullIcQty as n dim vBullBfQty as n dim vBullConvQty as n 'Converted Qty DIM vCheckBase as L dim vCheckBlns as L DIM vConvertQty as N DIM vSumofArea as N DIM vSumofTrim as N DIM vSumofConv as N DIM vApplyQty as N dim vDeductTrims as L Dim vRevisedAreaQty as n DIM varC_result_direct as C DELETE a_vTrimType DIM a_vTrimType[5] as c dim temp_list as c temp_list = <<%list% Round Top Base Flat Top Base Flat Tile Bullnose Mud Cap Bead Counter Trim %list% a_vTrimType.initialize(temp_list) Calculate_button_label ="Calcula&te" ok_button_label = "&OK" cancel_button_label = "&Cancel" 'copied from new xdlg DIM vFieldCode_def as C DIM vFieldVndr_orig as C if vSection ="floor" then vFloorCode_orig = "k=rmfinish,{keylist_build(\"H=.05,1:10[Plan], 2:25[Series name], 3:20[Shape]\",''+Floor_plan,left(''+lookup(\"materialscheme\",\"Materialsch_id=\"+quote(Floor_Plan),\"Plancode\"),10),left(''+lookup(\"series\",\"series_id=\"+quote( lookup(\"materialscheme\",\"materialsch_id=\"+quote(Floor_Plan),\"Series_id\")),\"series_name\"),25),left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Floor_Plan),\"Shape_id\"),15))}{lookup(\"Rmtables\",\"Rmtable_id=\"+quote(Rmtable_Id),\"Project_id\") = [varC->vProjectID].and. unique_key_value()}" vFieldCode_def = replace_parameters(vFloorCode_orig,local_variables()) else 'for Wall case vWallCode_orig = "k=rmfinish,{keylist_build(\"H=.05,1:10[Plan Code],2:25[Series Name],3:20[Size]\",''+Wall_plan,left(''+lookup(\"materialscheme\",\"Materialsch_id=\"+quote(wall_Plan),\"Plancode\"),10),left(''+lookup(\"series\",\"series_id=\"+quote( lookup(\"materialscheme\",\"materialsch_id=\"+quote(wall_Plan),\"Series_id\")),\"series_name\"),25),left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Wall_Plan),\"Shape_id\"),20))}{lookup(\"Rmtables\",\"Rmtable_id=\"+quote(Rmtable_Id),\"Project_id\") = [varC->vProjectID].and. unique_key_value()}" vFieldCode_def = replace_parameters(vWallCode_orig,local_variables()) end if 'Field Vendor list dim vFieldVndr_orig as c dim vFieldVndr_def as c vFieldVndr_orig = "k=prdctvndrs,{keylist_build(\"H=.05,1:15[Vendor Name]\",''+Seriesvndr_id,left(''+lookup(\"Seriesvndrs\",\"seriesvndr_id=\"+quote(Seriesvndr_Id),\"vendor_name\"),15))}{lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vFieldCode]),\"Prdctgroup_id\")=Prdctgroup_Id}" vFieldVndr_def = replace_parameters(vFieldVndr_orig,local_variables()) 'Accessories List DIM vFixtCode_orig as C DIM vFixtCode_def as C if vSection="floor" then vThrhldCode_orig = "k=rmfinish,{keylist_build(\"H=.05,1:15[Plan Code],2:25[Series Name], 3:15[Shape]\",''+Thrhld_plan,left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Thrhld_Plan),\"Plancode\"),15),left(''+Lookup(\"series\",\"series_id=\"+quote( lookup(\"materialscheme\",\"materialsch_id=\"+quote(thrhld_Plan),\"series_id\")),\"Series_name\"),25),left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Thrhld_Plan),\"Shape_id\"),15))}{lookup(\"Rmtables\",\"Rmtable_id=\"+quote(Rmtable_Id),\"Project_id\") = [varC->vProjectID].and. unique_key_value()}" vFixtCode_def = replace_parameters(vThrHldCode_orig,local_variables()) else vFixtCode_orig = "k=rmfinish,{keylist_build(\"H=.05,1:15[Plan Code],2:25[Series Name],3:15[Shape]\",''+fixture_plan,left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Fixture_Plan),\"Plancode\"),15),left(''+Lookup(\"series\",\"series_id=\"+quote( lookup(\"materialscheme\",\"materialsch_id=\"+quote(fixture_Plan),\"series_id\")),\"Series_name\"),25),left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(fixture_Plan),\"Shape_id\"),15))}{lookup(\"Rmtables\",\"Rmtable_id=\"+quote(Rmtable_Id),\"Project_id\") = [varC->vProjectID].and. unique_key_value()}" vFixtCode_def = replace_parameters(vFixtCode_orig,local_variables()) end if DIM vFixtVndr_orig as C DIM vFixtVndr_def as C vFixtVndr_orig = "k=prdctvndrs,{keylist_build(\"H=.05,1:15[Vendor name]\",''+Seriesvndr_id, left(''+lookup(\"seriesVndrs\",\"seriesVndr_id=\"+quote(Seriesvndr_Id),\"Vendor_name\"),15))}{lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vFixtCode]),\"Prdctgroup_id\")=Prdctgroup_Id}" vFixtVndr_def = replace_parameters(vFixtVndr_orig,local_variables()) DIM vFixtUom_rl_def as C vFixtUom_rl_def = "k=ctg_uom,{keylist_build(\"H=.05,1:10[Uom]\",''+Uom_id,left(''+Uom_id,10))}{}" 'Base -- Revised Testing because the above code are not working Dim vRtbCode_list as c ' as Rtb test only Dim vFtbCode_list as c ' as Ftb test only Dim vBasecode_def as c if vSection="floor" then vRtbCode_List = "k=rmfinish,{keylist_build(\"H=.05,1:15[Plancode],2:25[Series Name],3:15[Shape]\",''+Rtb_plan,left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Rtb_Plan),\"Plancode\"),15),left(''+Lookup(\"series\",\"series_id=\"+quote( lookup(\"materialscheme\",\"materialsch_id=\"+quote(Rtb_Plan),\"series_id\")),\"Series_name\"),25),left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Rtb_Plan),\"Shape_id\"),15))}{left(''+Rmfinish_id,7) = [varC->vProjectID].and. unique_key_value()}" vBasecode_def = replace_parameters(vRtbCode_list,local_variables()) Else vFtbCode_List = "k=rmfinish,{keylist_build(\"H=.05,1:15[Plancode],2:25[Series Name],3:15[Shape]\",''+ftb_plan,left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Ftb_Plan),\"Plancode\"),15),left(''+Lookup(\"series\",\"series_id=\"+quote( lookup(\"materialscheme\",\"materialsch_id=\"+quote(Ftb_Plan),\"series_id\")),\"Series_name\"),25),left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Ftb_Plan),\"Shape_id\"),15))}{left(''+Rmfinish_id,7) = [varC->vProjectID].and. unique_key_value()}" vBasecode_def = replace_parameters(vFtbCode_list,local_variables()) end if Dim vBaseStretch_list as c dim vBaseStretch_def as c vBaseStretch_List = "k=prdctgrp_queue,{keylist_build(\"H=.05,1:20[Shape Id],2:10[Group],3:10[Surface],4:60[Description]\",''+Prdctgroup_id,left(''+Shape_id,20),left(''+Group,10),left(''+Surface_id,10),left(''+xdescription,50))}{Series_id = lookup(\"materialscheme\",\"Materialsch_id=\"+quote([varC->vBaseCode]),\"Series_id\").AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBaseCode]),\"Surface_id\")=Surface_id .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBaseCode]),\"price_group\")=Group .AND. [varC->vBaseType]$Xdescription}" 'Original "+chr(13)+chr(10)+".and. [varC->vBaseType] $ Xdescription}" vBaseStretch_def = replace_parameters(vBaseStretch_List,local_variables()) DIM vBaseOut_List as C DIM vBaseOut_def as C vBaseOut_list = "k=prdctgrp_queue,{keylist_build(\"H=.05,1:20[Shape Id],2:10[Group],3:10[Surface],4:60[Description]\",''+Prdctgroup_id,left(''+Shape_id,20),left(''+Group,10),left(''+Surface_id,10),left(''+xdescription,50))}{Series_id = lookup(\"materialscheme\",\"Materialsch_id=\"+quote([varC->vBaseCode]),\"Series_id\") .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBaseCode]),\"Surface_id\")=Surface_id .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBaseCode]),\"price_group\")=Group .AND. [varC->vBaseType]$Xdescription .and. \"outside\" $ Xdescription}" 'Original "+chr(13)+chr(10)+".and. \"outside\" $ Xdescription}" vBaseOut_def = replace_parameters(vBaseOut_List,local_variables()) DIM vBaseInside_List as C DIM vBaseInside_def as C vBaseInside_list = "k=prdctgrp_queue,{keylist_build(\"H=.05,1:20[Shape Id],2:10[Group],3:10[Surface],4:60[Description]\",''+Prdctgroup_id,left(''+Shape_id,20),left(''+Group,10),left(''+Surface_id,10),left(''+xdescription,50))}{Series_id = lookup(\"materialscheme\",\"Materialsch_id=\"+quote([varC->vBaseCode]),\"Series_id\") .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBaseCode]),\"Surface_id\")=Surface_id .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBaseCode]),\"price_group\")=Group .AND. [varC->vBaseType]$Xdescription .and. \"inside\" $ Xdescription}" 'Original "+chr(13)+chr(10)+".and. \"inside\" $ Xdescription}" vBaseInside_def = replace_parameters(vBaseInside_list,local_variables()) DIM vBaseButt_List as C DIM vBaseButt_def as C vBaseButt_list = "k=prdctgrp_queue,{keylist_build(\"H=.05,1:20[Shape Id],2:10[Group],3:10[Surface],4:60[Description]\",''+Prdctgroup_id,left(''+Shape_id,20),left(''+Group,10),left(''+Surface_id,10),left(''+xdescription,50))}{Series_id = lookup(\"materialscheme\",\"Materialsch_id=\"+quote([varC->vBaseCode]),\"Series_id\") .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBaseCode]),\"Surface_id\")=Surface_id .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBaseCode]),\"price_group\")=Group .AND. [varC->vBaseType]$Xdescription .and. \"Butt\" $ Xdescription}" 'Original "+chr(13)+chr(10)+".and. \"inside\" $ Xdescription}" vBaseButt_def = replace_parameters(vBaseButt_list,local_variables()) 'Bullnose Dim vBullCode_list as c Dim vBullcode_def as c vBullCode_List = "k=rmfinish,{keylist_build(\"H=.05,1:15[Plancode],2:25[Series Name],3:15[Shape]\",''+Blns_plan,left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Blns_Plan),\"Plancode\"),15),left(''+Lookup(\"series\",\"series_id=\"+quote( lookup(\"materialscheme\",\"materialsch_id=\"+quote(Blns_Plan),\"series_id\")),\"Series_name\"),25),left(''+lookup(\"materialscheme\",\"materialsch_id=\"+quote(Blns_Plan),\"Shape_id\"),15))}{left(''+Rmfinish_id,7) = [varC->vProjectID].and. unique_key_value()}" vBullcode_def = replace_parameters(vBullCode_list,local_variables()) Dim vBullStretch_list as c dim vBullStretch_def as c vBullStretch_List = "k=prdctgrp_queue,{keylist_build(\"H=.05,1:20[Shape Id], 2:10[Group],3:10[Surface],4:60[Description]\",''+Prdctgroup_id,left(''+Shape_id,20),left(''+Group,10),left(''+Surface_id,10),left(''+xdescription,50))}{Series_id = lookup(\"materialscheme\",\"Materialsch_id=\"+quote([varC->vBullCode]),\"Series_id\") .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBullCode]),\"Surface_id\")=Surface_Id .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBullCode]),\"price_group\")=Group .AND. [varC->vBullType] $ Xdescription}"'original "+chr(13)+chr(10)+".and. [varC->vBullType] $ Xdescription}" vBullStretch_def = replace_parameters(vBullStretch_List,local_variables()) DIM vBullOut_List as C DIM vBullOut_def as C vBullOut_list = "k=prdctgrp_queue,{keylist_build(\"H=.05,1:20[Shape Id],2:10[Group],3:10[Surface],4:60[Description]\",''+Prdctgroup_id,left(''+Shape_id,20),left(''+Group,10),left(''+Surface_id,10),left(''+xdescription,50))}{Series_id = lookup(\"materialscheme\",\"Materialsch_id=\"+quote([varC->vBullCode]),\"Series_id\") .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBullCode]),\"Surface_id\")=Surface_Id .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBullCode]),\"price_group\")=Group .AND. [varC->vBullType]$ Xdescription .and. \"outside\" $ Xdescription}" 'Original "+chr(13)+chr(10)+".and. \"outside\" $ Xdescription}" vBullOut_def = replace_parameters(vBullOut_List,local_variables()) DIM vBullInside_List as C DIM vBullInside_def as C vBullInside_list = "k=prdctgrp_queue,{keylist_build(\"H=.05,1:20[Shape Id],2:10[Group],3:10[Surface],4:60[Description]\",''+Prdctgroup_id,left(''+Shape_id,20),left(''+Group,10),left(''+Surface_id,10),left(''+xdescription,50))}{Series_id = lookup(\"materialscheme\",\"Materialsch_id=\"+quote([varC->vbullCode]),\"Series_id\") .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBullCode]),\"Surface_id\")=Surface_Id .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBullCode]),\"price_group\")=Group .AND. [varC->vBullType]$ Xdescription .and.\"inside\" $ Xdescription}" 'Original "+chr(13)+chr(10)+".and. \"inside\" $ Xdescription}" vBullInside_def = replace_parameters(vBullInside_list,local_variables()) DIM vBullButt_List as C DIM vBullButt_def as C vBullButt_list = "k=prdctgrp_queue,{keylist_build(\"H=.05,1:20[Shape Id],2:10[Group],3:10[Surface],4:60[Description]\",''+Prdctgroup_id,left(''+Shape_id,20),left(''+Group,10),left(''+Surface_id,10),left(''+xdescription,50))}{Series_id = lookup(\"materialscheme\",\"Materialsch_id=\"+quote([varC->vbullCode]),\"Series_id\") .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBullCode]),\"Surface_id\")=Surface_Id .AND. lookup(\"materialscheme\",\"materialsch_id=\"+quote([varC->vBullCode]),\"price_group\")=Group .AND. [varC->vBullType]$ Xdescription .and. \"Butt\" $ Xdescription}" 'Original "+chr(13)+chr(10)+".and. \"inside\" $ Xdescription}" vBullButt_def = replace_parameters(vBullButt_list,local_variables()) 'Some of Default Calcilation dim shared vWidth as n dim shared vLength as n 'Start the xDialog box here varC_result_direct = ui_dlg_box("New Direct Materials",<<%dlg% {on_key=enter} {region1} Estimate ID:| [.25vEsthdid]; {endregion1}|{sp} {region12} Bid Section:| [.10vSection]; {endregion12}; {lf}; {frame=1: Field} {region2} {image=$$generic.orb.blue}; Plan Code:|{initial_focus} [%@vFieldCode_def%.20vFieldCode!vFieldCode_changed]| [.10vFieldQty]; Vendor:| [%@vFieldVndr_def%.20vFieldVendor]; {lf}; {endregion2}|{sp} {frame=1: Fixture} {region5} {image=$$generic.orb.orange}; Plan Code:| [%@vFixtCode_def%.20vFixtCode!vFixtCode_changed]| [.10vfixtQty]; Vendor:| [%@vFixtVndr_def%.20vFixtVndr]| UOM: [%@vFixtUom_rl_def%.12vFixtUom]; {endregion5}; {lf}; {frame=1: Base} {region3} {image=$$generic.orb.red}; Type of Shape:| [%v%.20vBaseType^=a_vTrimType!vBaseType_changed]; Plan Code:| [%@vBaseCode_def%.20vBaseCode!vBaseCode_changed]; Stretch:| [%@vBaseStretch_def%.20vBaseStretch!vBaseStretch_changed]|[.10vBaseStrQty]; Outside:| [%@vBaseOut_def%.20vBaseOut!vBaseOut_changed]|[.10vBaseOcQty]; Inside:| [%@vBaseInside_def%.20vBaseInside!vBaseInside_changed]|[.10vBaseIcQty]; Butterfry:| [%@vBaseButt_def%.20vBaseBfId!vBaseButt_changed]|[.10vBaseBfQty]; {lf}; {endregion3}|{sp} {frame=1: Bullnose} {region4} {image=$$generic.orb.red}; Type of Shape:| [%v%.20vBullType^=a_vTrimType!vBullType_changed]; Plan Code:| [%@vBullCode_def%.20vBullCode!vBullCode_changed]; Bullnose:| [%@vBullStretch_def%.20vBullStretch!vBullStretch_changed]|[.10vBullStrQty]; Outside:| [%@vBullOut_def%.20vBullOut!vBullOut_changed]|[.10vBullOcQty]; Inside:| [%@vBullInside_def%.20vBullInside!vBullInside_changed]|[.10vBullIcQty]; Butterfry:| [%@vBullButt_def%.20vBullBfId!vBullButt_changed]|[.10vBullBfQty]; {lf}; {endregion4}; {lf}; {frame=1: Converted Trims} {region6} {lf}; Deduct Base?:|(vCheckBase!vcheckBase_changed){sp=4}Base: [.10vBaseConvQty]; Deduct Blns?:|(vCheckBlns!vcheckBlns_changed){sp} Bullnose: [.10vBullConvQty]; |Sum of Deduction:| [.10vSumofConv]; {lf}; {endregion6}|{sp} {lf}; {frame=1: Deduction} {region7} {lf}; Apply Deduct?:| (vDeductTrims!vDeductTrims_changed){sp}Deduction: [.10vApplyQty!vApplyQty_changed]; |Revised Area Qty:| [.10vRevisedAreaQty]; {lf}; {endregion7}; {lf}; {region9} {line=3,0}; {justify=center} {sp=10}<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL> {endregion9}; %dlg%,<<%code% If a_dlg_button = "vFieldCode_changed" then if vSection ="floor" then vFieldCode_def = replace_parameters(vFloorCode_orig,local_variables()) else vFieldCode_def = replace_parameters(vWallCode_orig,local_variables()) end if a_dlg_button = "" vFieldVndr_def = replace_parameters(vFieldVndr_orig,local_variables()) end if 'Fixture Event condition If a_dlg_button = "vFixtCode_changed" then if vSection ="floor" then vFixtCode_def = replace_parameters(vThrHldCode_orig,local_variables()) else vFixtCode_def = replace_parameters(vFixtCode_orig,local_variables()) end if a_dlg_button = "" vFixtVndr_def = replace_parameters(vFixtVndr_orig,local_variables()) end if 'Base - Testing Section copy of 'Bullnose changed conditions If a_dlg_button = "vBaseType_changed" then if vSection="floor" then vBaseCode_def = replace_parameters(vRtbCode_List,local_variables()) else vBaseCode_def = replace_parameters(vFtbCode_List,local_variables()) end if a_dlg_button = "" end if If a_dlg_button = "vBaseCode_changed" then vBaseStretch_def = replace_parameters(vBaseStretch_List,local_variables()) a_dlg_button = "" end if If a_dlg_button = "vBaseStretch_changed" then a_dlg_button = "" vBaseOut_def = replace_parameters(vBaseOut_List,local_variables()) end if If a_dlg_button = "vBaseOut_changed" then a_dlg_button = "" vBaseInside_def = replace_parameters(vBaseInside_List,local_variables()) end if if a_dlg_button = "vbaseInside_changed" then a_dlg_button = "" vBaseButt_def =replace_parameters(vBaseButt_List,local_variables()) end if if a_dlg_button = "vBaseButt_changed" then a_dlg_button = "" end if 'End of Base copy 'Bullnose changed conditions If a_dlg_button = "vBullType_changed" then vBullCode_def = replace_parameters(vBullCode_List,local_variables()) a_dlg_button = "" end if If a_dlg_button = "vBullCode_changed" then vBullStretch_def = replace_parameters(vBullStretch_List,local_variables()) a_dlg_button = "" end if If a_dlg_button = "vBullStretch_changed" then vbullOut_def = replace_parameters(vBullOut_List,local_variables()) a_dlg_button = "" end if If a_dlg_button = "vBullOut_changed" then vBullInside_rl_def = replace_parameters(vBullInside_List,local_variables()) a_dlg_button = "" end if if a_dlg_button = "vBullInside_changed" then a_dlg_button ="" vBullButt_def = replace_parameters(vBullButt_list,local_variables()) end if if a_dlg_button = "vBullButt_changed" then a_dlg_button ="" end if 'Apply Qty Get the Conversion [COLOR="Red"] if a_dlg_button = "vCheckBase_changed" then if vcheckBase = .t. then Get_prdct_dimension(vBaseStretch) ui_msg_box("Base","Base "vWidth) 'Check for my UDF vBaseConvQty = round(((vBaseStrQty * 12 *vWidth) /144),2) ui_msg_box("base","converted "vBaseConvQty) else vBaseConvQty =0 end if a_dlg_button="" end if if a_dlg_button = "vCheckBlns_changed" then if vCheckBlns = .t. Get_prdct_dimension(vBullStretch) ui_msg_box("Bullno","bullnose is "vLength) vBullConvQty = round(((vBullStrQty * 12* vWidth) /144),2) ui_msg_box("bull","bull Converted "vBullConvQty) else vBullConvQty =0 end if a_dlg_button="" end if If a_dlg_button = "vDeductTrims_changed" then vSumofConv = round(vBaseConvQty + vBullConvQty,2) a_dlg_button = "" if vDeductTrims =.t. vRevisedAreaQty = round(vFieldQty - if(vApplyQty<>0,vApplyQty,vSumofConv),2) else vRevisedAreaQty = vFieldQty end if end if If a_dlg_button = "vApplyQty_changed" then a_dlg_button = "" if vDeductTrims =.t. vRevisedAreaQty = round(vFieldQty - if(vApplyQty<>0,vApplyQty,vSumofConv),2) else vRevisedAreaQty = vFieldQty end if end if[/COLOR] if a_dlg_button = "Cancel" then msg = "Are you sure you want to close the Estimate Criteria Page Without saving?" answer = ui_msg_box("Notice",msg,ui_yes_no) if answer = ui_yes_selected then a_dlg_button = "&Cancel" else a_dlg_button = "" end if end if %code%) 'Save Current Record to table as New Record. if varC_result_direct = "ok" then dim shared tCrit as p tCrit = table.get("est_criteria") tCrit.enter_begin() 'Deleted the Fields here for shrink space tCrit.enter_end(.t.) end if 'tCrit.close() END FUNCTION
Comment