Hello!
I need some direction please? I have a Patch function that is saving a record to a SQL table successfully. I have been asked to create two records at once for employees who will be swapping job positions. So, one employee who was working as a teacher with a similar job description will be trading places with another. I need to save employee ID, F,M,L name, Location, etc. This will be two brand new records that I am capturing the data for through LookUps across multiple screens. What would be the best approach to accomplish this? Bonus points for working examples. 🙂
Set(VarReturn, Patch(
DataSource,
Defaults(DataSource),
{
TransEmpID: dcEmpID_1.Text,
Location: lblddlLocationFilterSelection.Text,
LocationNumber: lblEmpLocationCode.Text,
TransEmpFName: dcFName_2.Text,
TransEmpMName: dcMInitial_2.Text,
TransEmpLName: dcLName_1.Text,
TransEmpEmail: dcEmail_1.Text,
EmpBargUnit: txtBU_1.Text,
EffectiveDate: dcEffDate_4.SelectedDate,
TransToPosNum: Proper(ddlJobDesc_2.Selected.pmpc_position),
TransToJobDesc: Proper(ddlJobDesc_2.Selected.prjb_long),
PASubmittedForReplacedEmp: rdoPAAlreadySubmitted.Selected.Value,
ReasonForChange: ddlPAReason_1.Selected.Value,
PANotes: dcNotes_4.Text,
ManagerEmail: lblHMEmail.Text,
ApprovalStatus: lblApproval_Status_1.Text,
TransFullName: txtfullname_1.Text,
TransEmpMstrCurrentJobNo: lblCurrentPosNum.Text,
TransEmpMstrCurrentJob: txtEmpMstrJob_1.Text,
PATimeStamp: Now()
}
) );
VarReturn.ID; <--Using to upload files to SharePoint with employee Metadata in next screen.