I tried to patch my repeating table and for submit i wrote this onSelect submit button.
Patch('Travel Request', Defaults('Travel Request'),RequestForm.Updates,RequestForm_1.Updates); Navigate('Thank you',ScreenTransition.Cover);
ForAll(TravelCollection, If(!IsBlank(LineItem), Patch(TravelDetail, Defaults(TravelDetail), {Title:LineItem, EstimatedCost:LineCost, Remark:LineRemark, MasterID:RequestForm_1.LastSubmit.ID})));
All is good, but it just doesn't read my LastSubmit.ID and when passed to sharepoint, the MasterID field is empty. 😭
Thank you so much
Solved! Go to Solution.
@N_Aainism LastSubmit.ID will be available only when you use the SubmitForm() function. If you use Patch, use the return value to capture the patched record. Try this,
Set(varPatchedRecord, Patch('Travel Request', Defaults('Travel Request'),RequestForm.Updates,RequestForm_1.Updates));
ForAll(TravelCollection, If(!IsBlank(LineItem), Patch(TravelDetail, Defaults(TravelDetail), {Title:LineItem, EstimatedCost:LineCost, Remark:LineRemark, MasterID:varPatchedRecord.ID})));
@N_Aainism LastSubmit.ID will be available only when you use the SubmitForm() function. If you use Patch, use the return value to capture the patched record. Try this,
Set(varPatchedRecord, Patch('Travel Request', Defaults('Travel Request'),RequestForm.Updates,RequestForm_1.Updates));
ForAll(TravelCollection, If(!IsBlank(LineItem), Patch(TravelDetail, Defaults(TravelDetail), {Title:LineItem, EstimatedCost:LineCost, Remark:LineRemark, MasterID:varPatchedRecord.ID})));
You are a life saver! It works like magic. Thank you so much!
May you have a wonderful life 🙂
User | Count |
---|---|
119 | |
87 | |
86 | |
75 | |
66 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |