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 / Unable to save to chil...
Power Apps
Suggested Answer

Unable to save to child table using Patch with gallery in Powerapps

(1) ShareShare
ReportReport
Posted on by 222
Hi,
 
I have a main gallery that links to a child table based on a 'Master ID'. 
Filter( 'RV Requests Details','Master ID' = RVUpdate.Selected.'Master ID')
 
I would like to update fields in the child table and am not able to save using Patch.
The Patch (sample) is as follows:
Patch('RV Requests Update',LookUp('RV Requests Update', ID=Gallery5_1.Selected.ID),
{
KM:txtKM.Text,  
Term:txtTerm.Text,  
'RV Percent':  txtRVPerc.Text,  
'RV GST Incl':  txtRVGST.Text,  
'End Age':txtEndKm.Text,  
'End KM': txtEndAge.Text,  
'Purchase Price': Value(txtPurchasePrice.Text)
});
 
Kind regards
 
 
Rene Voller
 
 
Categories:
I have the same question (0)
  • Vish WR Profile Picture
    3,748 on at
    If(
        IsError(
            Patch(
                'RV Requests Update',
                LookUp('RV Requests Update', ID = Gallery5_1.Selected.ID),
                {
                    'Current KM':   Value(txtKM.Text),
                    Term:           Value(txtTerm.Text),
                    'RV Percent':   Value(txtRVPerc.Text),
                    'RV GST Incl':  Value(txtRVGST.Text),
                    'End Age':      Value(txtEndAge.Text),
                    'End KM':       Value(txtEndKm.Text),
                    'Purchase Price': Value(txtPurchasePrice.Text)
                }
            )
        ),
        Notify("Save failed - check field types or record ID", NotificationType.Error),
        Notify("Saved successfully!", NotificationType.Success)
    );
    Refresh('RV Requests Update');
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    you can also try below :
     
    With(
        { rec: Gallery5_1.Selected },
        Patch(
            'RV Requests Details',
            rec,
            {
                KM: Value(txtKM.Text),
                Term: txtTerm.Text,
                'RV Percent': Value(txtRVPerc.Text),
                'RV GST Incl': Value(txtRVGST.Text),
                'End Age': txtEndKm.Text,
                'End KM': txtEndAge.Text,
                'Purchase Price': Value(txtPurchasePrice.Text)
            }
        )
    )
    If Patch STILL doesn’t work 
    Check these:
     
    A. ID column mismatch : Make sure you are matching correct key column
    • SharePoint uses ID
    • Dataverse uses GUID
    B. Permissions issue:  List may allow read but not edit
    C. Column internal name mismatch
    Example:
    'RV GST Incl' might actually be:
    • RV_x0020_GST_x0020_Incl
    D. Lookup table confusion
    If 'Master ID' is a lookup:
    You may need:
    • 'Master ID'.Value = ...
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,431 Super User 2026 Season 1 on at
     
    The issue is not associated with Master–Child relationship however this could be casting issue with the record you are patching with the table (DataSource).
     
    IfError(
        Patch(
            'RV Requests Update',
             Gallery5_1.Selected,
            {
                KM: Value(txtKM.Text),
                Term: Value(txtTerm.Text),
                'RV Percent': Value(txtRVPerc.Text),
                'RV GST Incl': Value(txtRVGST.Text),
                'End KM': Value(txtEndKm.Text),
                'End Age': Value(txtEndAge.Text),
                'Purchase Price': Value(txtPurchasePrice.Text)
            }
        ),
        Notify(
            "Save failed for this record. Please check values.",
            NotificationType.Error
        ),
        Notify(
            "Record saved successfully.",
            NotificationType.Success
        )
    )
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • Vish WR Profile Picture
    3,748 on at
     
     

    Just wanted to check in and see if everything is working now. If you still need any help, feel free to let me know.

     

    Vishnu WR
     
    Please  Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like 

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard