To All:
using the code below:
When I select an employee number from the External list Record get, I need to fill in the First Name, last Name, Craft and Craftdesc.
Where do I put the Xbasic so that when I leave focus of the Select Employee Number Box, I can do the lookups.
Thanks
charlie Crimmel
'Date Created: 27-Nov-2009 07:59:53 AM
'Last Updated: 23-Jan-2010 02:20:24 PM
'Updated By : charlie
trace.clear()
DIM SHARED v_empnum as C
DIM SHARED v_lastname as C
DIM SHARED v_firstname as C
DIM SHARED v_craft as D
DIM SHARED v_craftdesc as C
DIM SHARED v_workrel as D
DIM SHARED v_wrkdesc as C
DIM SHARED v_costcode as D
DIM SHARED v_cccc as C
DIM SHARED v_entrydate as C
DIM SHARED v_payweek as C
DIM SHARED v_wo as D
DIM SHARED v_xperdiem as C
DIM SHARED v_xother as C
DIM SHARED v_xtravel as C
DIM SHARED v_xreimb as C
DIM SHARED varC_result as C
DIM SHARED v_EMPNUM as C
DIM SHARED varC_result as C
auto_list_v_SelectEmp = table.external_record_content_get("empdata","Empnum + \" \" + substr(Lname,1,25) + \" \" + trim(Fname)","Lname+Fname","")
auto_list_v_SelectWr = table.external_record_content_get("workrel","str(Workorder,10) + \" \" + substr(Costcenter,1,13) + \" \"+Descript","Workorder","")
temp_count = w_count(auto_list_v_SelectEmp,crlf())
temp_count2 = w_count(auto_list_v_SelectWr,crlf())
DELETE a_v_SelectEmp
DELETE a_v_SelectWr
DIM a_v_SelectEmp[temp_count] as c
DIM a_v_SelectWr[temp_count2] as c
a_v_SelectEmp.initialize(auto_list_v_SelectEmp)
a_v_SelectWr.initialize(auto_list_v_SelectWr)
heading_string = "Timentry"
ok_button_label = "&Save Record"
cancel_button_label = "&Cancel"
varC_result = ui_dlg_box("Enter Xtra Billing",<<%dlg%
{region}
Select Employee:| [%v%.62v_SelectEmp^+a_v_SelectEmp];
{endregion};
{region}
Employee Num:| [.40v_empnum] ;
{endregion};
{region}
Last Name:| [.40v_lastname] First Name:| [.40v_firstname];
Craft:| [.40v_craft] Craft Desc:| [.40v_craftdesc];
Entrydate:| [%DATE%.40v_Entrydate!v_Entrydate] Payweek:| [%DATE%.40v_payweek!v_payweek];
Work Release:| [%v%.72v_SelectWr^+a_v_SelectWr];
Wrkrel Desc:| [.60v_wrdesc] Costcode:| [.40v_costcode];
CCCC:| [.25v_cccc] Wo:| [.25v_wo];
{endregion};
{region}
Perdiem:| [.25v_xperdiem] Travel:|[.25v_xtravel];
Other:| [.25v_xother] Reimbursement:|[.25v_xreimb];
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!Save Record> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%)
using the code below:
When I select an employee number from the External list Record get, I need to fill in the First Name, last Name, Craft and Craftdesc.
Where do I put the Xbasic so that when I leave focus of the Select Employee Number Box, I can do the lookups.
Thanks
charlie Crimmel
'Date Created: 27-Nov-2009 07:59:53 AM
'Last Updated: 23-Jan-2010 02:20:24 PM
'Updated By : charlie
trace.clear()
DIM SHARED v_empnum as C
DIM SHARED v_lastname as C
DIM SHARED v_firstname as C
DIM SHARED v_craft as D
DIM SHARED v_craftdesc as C
DIM SHARED v_workrel as D
DIM SHARED v_wrkdesc as C
DIM SHARED v_costcode as D
DIM SHARED v_cccc as C
DIM SHARED v_entrydate as C
DIM SHARED v_payweek as C
DIM SHARED v_wo as D
DIM SHARED v_xperdiem as C
DIM SHARED v_xother as C
DIM SHARED v_xtravel as C
DIM SHARED v_xreimb as C
DIM SHARED varC_result as C
DIM SHARED v_EMPNUM as C
DIM SHARED varC_result as C
auto_list_v_SelectEmp = table.external_record_content_get("empdata","Empnum + \" \" + substr(Lname,1,25) + \" \" + trim(Fname)","Lname+Fname","")
auto_list_v_SelectWr = table.external_record_content_get("workrel","str(Workorder,10) + \" \" + substr(Costcenter,1,13) + \" \"+Descript","Workorder","")
temp_count = w_count(auto_list_v_SelectEmp,crlf())
temp_count2 = w_count(auto_list_v_SelectWr,crlf())
DELETE a_v_SelectEmp
DELETE a_v_SelectWr
DIM a_v_SelectEmp[temp_count] as c
DIM a_v_SelectWr[temp_count2] as c
a_v_SelectEmp.initialize(auto_list_v_SelectEmp)
a_v_SelectWr.initialize(auto_list_v_SelectWr)
heading_string = "Timentry"
ok_button_label = "&Save Record"
cancel_button_label = "&Cancel"
varC_result = ui_dlg_box("Enter Xtra Billing",<<%dlg%
{region}
Select Employee:| [%v%.62v_SelectEmp^+a_v_SelectEmp];
{endregion};
{region}
Employee Num:| [.40v_empnum] ;
{endregion};
{region}
Last Name:| [.40v_lastname] First Name:| [.40v_firstname];
Craft:| [.40v_craft] Craft Desc:| [.40v_craftdesc];
Entrydate:| [%DATE%.40v_Entrydate!v_Entrydate] Payweek:| [%DATE%.40v_payweek!v_payweek];
Work Release:| [%v%.72v_SelectWr^+a_v_SelectWr];
Wrkrel Desc:| [.60v_wrdesc] Costcode:| [.40v_costcode];
CCCC:| [.25v_cccc] Wo:| [.25v_wo];
{endregion};
{region}
Perdiem:| [.25v_xperdiem] Travel:|[.25v_xtravel];
Other:| [.25v_xother] Reimbursement:|[.25v_xreimb];
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!Save Record> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%)
Comment