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 / Problems with Patch fu...
Power Apps
Suggested Answer

Problems with Patch functionality

(1) ShareShare
ReportReport
Posted on by 8
Hi all,
 
I'm pretty new to Power Apps, being thrown in the deep end when someone at work suddenly left. I'm building a Power App that needs to update a Sharepoint list.
 
Below is a start to the Patch that is immediately throwing up errors:
 
Patch(GOV_Request_for_Legal_Advice,Defaults(GOV_Request_for_Legal_Advice),
{Name:txtName.Value,
}
)
 
One example of an error is:
txtName = There is an error in this formula. Try revising the formula and running it again. Data type: Control
 
When I'm adding the code, I'm using the options that are displayed that seem relevant. 
  • Name = name of column in Sharepoint list
  • txtName = name of field in Power App
  • Value = seemed the only logical one to choose from.
I think it's that third variable that is tripping me up.
 
Many thanks
Categories:
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,975 Super User 2026 Season 2 on at
    Hi
     
    What is txtName is it a Text Input? or something else?
    Also, be careful with "names" in sharepoint. The Label you see is just a string, if you want the name for sure, go to the settings of the List and look at the Column you will see for instance name
     
    But when you click on Name, to open properties for that column and you look at the URL (yes the url) the last characters are its INTERNAL name which you can only see in the URL
     
    If its supposed to be a Text, and the control is a Text Input then the proper propert is txtName.Text not Value, if you see the word Value, then I don't think its a Text input.
     
    Unless maybe its the Modern ones?
     
    Please share a picture of the controls property window, when you have it selected for us to verify.
     
     
     
  • Suggested answer
    Ammar Zaied Profile Picture
    97 on at
    Hi,
    It looks like you're on the right track, but the error is likely due to the way you're referencing txtName.Value. In Power Apps, controls like text inputs (e.g., txtName) don't always have a Value property, especially if you're using a text input field. Instead, you should use .Text to retrieve the input value from a text box.
     
    try this code:
    Patch(
        GOV_Request_for_Legal_Advice, 
        Defaults(GOV_Request_for_Legal_Advice),
        {
            Name: txtName.Text
        }
    )
    

    Key points:

    • txtName.Text should be used to get the text from the txtName input field (instead of Value).
    • Make sure that the field Name in the SharePoint list is correctly referenced. It must exactly match the field name in SharePoint, including capitalization.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard