In the following xdialog code, I have an event placed on the priority field to report in a msgbox() the values in the text fields for Section, Pol_name, and Pol_no. and generate the field values for the last two fields by concatenating these field values. I believe it should be working, but it is not. It works in the small second example at the bottom. I'm not seeing where the problem lies. What am I missing? I've been at this for hours!! :( Thanks.
Code:
dim global vproceed as c dim vPrefix as C="LAB" dim vSectn as C="" dim vLsect as C vLsect=comma_to_crlf("ADM,BLB,CYT,CHE,GEN,HEM,HIS,IMM,LIS,MIC,OFR,OPA,POC,QUA,SEN") dim vGrouping as C dim vPol_no as C dim vini_date as D=date() dim vrenew_date as D=date()+(365*5) dim vPol_name as C="Policy Test" dim vDc_number as C dim vPol_num_full as C dim vPriority as C dim vsign_level as C dim vSL as C="Supervisor"+crlf()+"Director" dim dlg_text as C dlg_text = <<%dlg% {background=#175,165,135} {xmargin=2,2} {frame=1,1} {region} Prefix: | [.10vprefix]; Section: | [.10vsectn^+vLsect]; Grouping: | [.10vgrouping] 900 ; Policy Number: | [.10vpol_no] 905; Initiate Date: | [%P=popup.calendar(dtoc(vini_date));I=popup.calendar%.16vini_date]; Renew_Date: | [%P=popup.calendar(dtoc(vrenew_date));I=popup.calendar%.16vrenew_date]; Policy Name: | [.30vpol_name]; Signature Level: | [.20vsign_level^+vSL]; Priority: | [.10vpriority!dcnx_*] 1-5 ; Full Policy Number: | [.40vpol_num_full]; Doc Control No.: | [.40vdc_number]; {endregion}; {lf}; {line=1,0} {lf}; {justify=center}<10OK> <10Cancel> %dlg% dim vresults as C RETRY: vresult=ui_dlg_box("Policy Entry", dlg_text, <<%code% IF left( a_dlg_button, 5 ) = "dcnx_" IF a_dlg_button = "dcnx_change" vPol_num_full=vprefix+"_"+alltrim(vsectn)+"_"+alltrim(vPol_no) vDc_number=vPol_num_full+"_"+cdate(vini_date)+"_"+cdate(vRenew_date) msgbox("Pol Name",vpol_name) msgbox("Values","section: "+alltrim(vsectn)+crlf()+"PN: "+vpol_no) END IF a_dlg_button = "" END IF %code%) 'vPol_num_full=vprefix+"_"+alltrim(vsectn)+"_"+alltrim(vPol_no) 'vDc_number=vPol_num_full+"_"+cdate(vini_date)+"_"+cdate(vRenew_date) msgbox("Outcome",alltrim(vpol_num_full)+crlf()+alltrim(vdc_number))
Code:
dim vR as C dim vX as C="" dim vY as C="" dim vZ as C="Lab" vR=ui_dlg_box("Date",<<%a% [.30vZ]; [.30vX!dcnx_*]; [.30vY]; <ok> %a%,<<%code% IF left( a_dlg_button, 5 ) = "dcnx_" IF a_dlg_button = "dcnx_change" vY=vZ+"_"+vX END IF a_dlg_button = "" END IF %code%)
Comment