
Patch(
'Housing SF182 Online',
Defaults('Housing SF182 Online');
{
User_x0020_Hnumber: A2Hnumber.Text,
User_x0020_FMLName: Office365Users.MyProfile().DisplayName,
A3UserDOB: A3DOB.Text,
A4HomeAddress: A4HomeAddress.Text,
A5HomeTelephone: 'A5Home Phone'.Text,
A6_x0020_Position_x0020_Level: 'A6Position Level'.Selected.Title,
A4HomeCity: A4HomeCity.Text,
A4HomeState: A4HomeState.Selected.State_Description,
A4HomeZip: A4HomeZip.Text,
A_x0026_ABBR: A7ABBR.Selected.Abbr,
A7Component: A7Componet.Selected.'Office Component',
A7FieldOffice: A7FieldOffice.Selected.MFHOffice,
A7State: A7State.Selected.State_Description,
A8OfficePhoneNumber: A8PhoneNumber.Text,
A9WorkEmail: Office365Users.MyProfile().Mail,
A10_x0020_Position: 'A10Position Title'.Selected.Positions,
A11SpecialAccomindation: A11SpecialAccomindation.Text,
A11Description: A11Description.Text,
A12Type_x0020_of_x0020_Appointme: 'A12Type of Appointment'.Selected.S_Description,
A13_x0020_EdLevel: 'A13Ed Level'.Selected.S_Description,
A14PayPlan: 'A14Pay Plan'.Selected.Code,
A15_x0020_Series: A15Series.Selected.Series,
A16_x0020_Grade: A16Grade.Text,
A17Step: A17Step.Text,
Title: BRequestStatus.Selected.S_Description,
B1AVenderName: B1AVenderName.Selected.Name,
B1BLocationOfTrainingState: B1bLocationofTrainingSite.Text,
B1cVenderPhone: B1CVenderPhone.Text,
B1dVenderEmailAddress: B1dVenderEmailAddress.Text,
B1eVenderWebsite: B1eVenderWebsite.Text,
B1fVenderPOC: B1fVenderPOC.Text,
B2A_x0020_Course_x0020_Title: B2ACourseTitle.Text,
B2BCourseNumber: B2BCourseNumber.Text,
B3TrainingStartDate: B3TrainingStartDate.Text,
B3TrainingEndDate: B4TrainigEndDate.Text,
B5TrainingDutyHours: B5TrainingDutyHours.Text,
B6TainingNonDutyHours: B6TainingNonDutyHours.Text,
B7_x0020_Training_x0020_Purpose_: B7TrainingPurposeType.Selected.S_Description,
B8TrainingTypeCode: B8TrainingTypeCode.Selected.S_Description,
B9_x0020_Training_x0020_Sub_x002: B9TrainigSubTypeCode.Selected.SubCode,
B10_x0020_Training_x0020_Deliver: B10TrainigDeliveryTypeCode.Selected.S_Description,
B11_x0020_Training_x0020_Designa: B11TrainigDesignationTypeCodeType.Selected.S_Description,
B12_x0020_Training_x0020_Credit: B12TrainigCredit.Text,
B13_x0020_Training_x0020_Credit_: B13TrainingCreditTypeCode.Selected.S_Description,
B14TrainingAccreditationIndicato: B14TrainingAccreditationIndicator.Selected.S_Decription,
B15_x0020_Cont_x0020_Serv_x0020_: 'B15 ContinuedServiceAgreement'.Selected.S_Description,
B16_x0020_Cont_x0020_Serv_x0020_: B16ContinueServiceAgreement.Text,
B17_x0020_Training_x0020_Source_: B17TrainigSourceCode.Selected.S_Description,
B18IndividualorGroup: B18IndividualorGroup.Selected.S_Description,
B19StudentMembershipID: B19StudentMembershipID.Text,
B20SkillLearningObjective: B20SkillLearningObjective.Text,
B21AgencyUseOnly: B21AgencyUseOnly.Text,
C1aTuitionandFees: C1aTuitionandFees.Text,
C1bBooksandMaterial: C1bBooksandMaterial.Text,
C1cTotal: C1cTotal.Text,
C2aTravel: C2aTravel.Text,
C2bPerDiem: C2bPerDiem.Text,
C1AppropriationFund: C1AppropriationFund.Text,
C2cTotal: C2cTotal.Text,
C2AppropriationFund: C2AppropriationFund.Text,
C3TotalTrainingNonGovContCost: C3TotalTrainingNonGovContCost.Text,
C4DocPurchasingOrderReqNumber: C4DocPurchasingOrderReqNumber.Text,
C5DigitSymbol: C5DigitSymbol.Text,
C6BillingInstruction: C6BillingInstruction.Text
}
);
Navigate('SF182 Individual Request Form Page 2');
You can handle this a couple of ways, but the easiest looks to be to wait until your user has entered everything on page 2 and then run your Patch(). Your Patch() appears to be referencing only control values, and those are accessible throughout the app.
Any time you invoke Defaults() in the second argument of Patch() it is looking to create a new record.
Hope that helps,
Bryan