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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using Patch function t...
Power Apps
Unanswered

Using Patch function to update existing record in SharePoint List

(0) ShareShare
ReportReport
Posted on by 11

Hi everyone,

 

I am trying to build up an Asset Check-Out system in Power Apps, and I have a sharepoint list to record the request from my team. What I wanted to do is to display pending cases details and update asset serial number through an input box. 

 

ihungko_0-1657867752571.png

I am using a gallery with filters to display all the pending cases that need to patch the serial numbers; and a DisplayForm to show the details of the selected case. These first two steps are working just fine. But the last step, the text input and button fail to do what I wanted.

 

Here's the code I currently use:

 

Patch('ISC Asset Request Form', LookUp('ISC Asset Request Form', 'Case ID'= DataCardValue17.Text),{'Asset S/N':AssetSerialNumber_Input});

 

  • Source: 'ISC Asset Request Form'
  • Case ID works as an identifier to find the specific request case:
    • 'DataCardValue17' is the display value in the display form.
    • 'Case ID' is the key column in sharepoint list
  • Information I need to patch: Asset Serial Number

 

How can I revise the code to make the patching right? Or might there be another efficient ways to do this update record?

 

Thanks in advance! 

Categories:
I have the same question (0)
  • MVP-Phipps Profile Picture
    3,508 Super User 2024 Season 1 on at

    What error do you get or is it just not patching?

     

    I would suggest replacing DataCardValue17.Text and use a variable. Set the variable on Gallery Arrow On Click:
    Set(selectedItem, ThisItem); 

    Then in your patch replace DataCardValue17.Text with selectedItem.'Case ID'.

    Let me know if this works.

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

     

  • Verified answer
    ihungko Profile Picture
    11 on at

    Haha my bad, I suddenly realized that Input is a control that cannot be stored a string, I need to add ".Text" after it. Problem solved! Thanks for your suggestion though!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard