Re: x_Dialog Tab Stops
Apologies, I meant to just remove the alltrim)()
Apologies, I meant to just remove the alltrim)()
Alpha Software Mobile Development Tools: Alpha Anywhere | Alpha TransForm |
elseif "Supervisor"$vWhich dim vwkr as N = val(alltrim(word(vWorker,1))) filt = "Sup_Id = [varN->vWkr]" elseif "Department"$vWhich ' dim vwkr as N = val(alltrim(word(vWorker,1))) filt = "Adm_Id = [varN->empid]" else dim vwkr as N = val(alltrim(word(vWorker,1))) filt = "Emp_Id = [varN->vWkr]" end if if vTYPE="Pending" if "Supervisor"$vWhich .or. "Employee"$vWhich filt=filt+".and. Sup_Resp="+chr(92)+"\"\\"" elseif "Department"$vWhich filt=filt+".and. Adm_Resp="+chr(92)+"\"\\"" [COLOR="#FF0000"] 'filter becomes Adm_Id = 433.and. Adm_Resp=\"\"[/COLOR] end if end if filt = replace_parameters(filt,local_variables()) ord = "E_date" 'Browse Definition: %code% browseObj1_browse_definition = <<%xml% <browse gridline_horizontal="yes" gridline_vertical="yes" data_entry_style="default" row_height="16" filter="__ans_t__" order="__v_ord__" > <code> 'Now, display the Xdialog substituting the Filter and order into the definition string browseObj1_browse_definition = strtran(browseObj1_browse_definition,"__v_ord__",ord) 'replace variable placeholder for order browseObj1_browse_definition = strtran(browseObj1_browse_definition,"__ans_t__",Filt) ' replace variable placeholder for filter [COLOR="#FF0000"]'which becomes: <browse gridline_horizontal="yes" gridline_vertical="yes" data_entry_style="default" row_height="16" filter="Adm_Id = 433.and. Adm_Resp=\"\"" order="E_date" >�<code>� <OnRowDblClick>script_play_local("Dlg_appr_Time_off"[/COLOR] ui_dlg_box(dlg_title,dlg_body,dlg_event)
if vTYPE="Pending" if "Supervisor"$vWhich .or. "Employee"$vWhich filt=filt+".and. isblank('Sup_Resp')" elseif "Department"$vWhich filt=filt+".and. isblank('Adm_Resp')" end if end if
DIM Filt as C = "" DIM ord as C = "" if "Day"$vWhich filt = replace_parameters("Req_Date = [varD->vReq_date]",local_variables()) dlg_title = "Time Off Requests for "+date_format(vReq_date,"Weekday, Month dd, yyyy") +" in the Department" elseif "Range"$vWhich filt = replace_parameters("between(Req_Date,[varD->vReq_date1],[varD->vReq_date2])",local_variables()) dlg_title = "Time Off Requests between "+date_format(vReq_date1,"Weekday, Month dd, yyyy") +" and "+ date_format(vReq_date2,"Weekday, Month dd, yyyy")+" in the Department" elseif "Supervisor"$vWhich vWkr = val(alltrim(word(vWorker,1))) Dim vSup_name as C = alltrim(word_subtract(vWorker,word(vWorker,1))) dlg_title = "Time Off Requests for "+w_upper(lower(vSup_name))+"[COLOR="#FF0000"]'s [/COLOR]Department" filt = "Sup_Id=[varN->vWkr]" elseif "Department"$vWhich dlg_title = "Time Off Requests for the Department" filt = "Adm_Id=[varN->empid]" else vwkr = val(alltrim(word(vWorker,1))) Dim vWkr_name as C = alltrim(word_subtract(vWorker,word(vWorker,1))) dlg_title = "Time Off Requests for "+w_upper(lower(vWkr_name)) filt = "Emp_Id=[varN->vWkr]" end if if vTYPE="Pending" if "Supervisor"$vWhich .or. "Employee"$vWhich filt=filt+".and. isblank('Sup_Resp')" elseif "Department"$vWhich filt=filt+".and. isblank('Adm_Resp')" end if end if DIM filt1 as C = replace_parameters(filt,local_variables())
Comment