web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Couldn't write my Mast...
Power Apps
Answered

Couldn't write my MasterID

(0) ShareShare
ReportReport
Posted on by 4

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 

 

 

 

Error.PNG
Categories:
I have the same question (0)
  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @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 Profile Picture
    4 on at

    You are a life saver! It works like magic. Thank you so much!

    May you have a wonderful life 🙂 

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @N_Aainism Glad to help!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard