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 / Updating a record from...
Power Apps
Answered

Updating a record from a Sharepoint List

(0) ShareShare
ReportReport
Posted on by 5

I have a sharepoint list which has the following column and the sharepoint list is named as family, I am trying to make a program/app via powerapps to add the personal info of a person however. I seem to be having an issue with updating the record.


Name
Contact No
Birthday
Mother

Father

Children
Location


On first screen I am updating the following via Patch
Name

Contact No

Birthday

 

Patch(Family,Defaults(Family),{Title:New, Name: TextInpu1.Text, Contact_x0020_No:TextInput2.Text, Birthday:TextInput3.Text})

 

and there are no issue with it.


On second screen I have and trying to update the information of the second screen via Patch
Patch(Family,<currentredcord?>,{Mother: TextInpu4.Text, Father:TextInput5.Text, Children:TextInput6.Text})

NOTE: <currentredcord?> is placed as I am not familiar with any other commands to select or specifically choose the record.

 

I can't seem to be able to select the current record and only update certain info of that specific record. CurrentItem seems is not recognized command, anyone can tell how do I select the same record and update the information? I've use the update command as well but unfortunately it doesnt update the record but instead create another record. your help is greatly appreciated.

Categories:
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @PMCPajadan,

    Could you please share a screenshot about your app's configuration?

    Do you want to update the same record (created in your first screen) within the second screen?

     

    If you want to update an existing record (created within your first screen) within your SP list data source using Patch function, you must find the record you want to update firstly.

    Please take a try to modify your formula within your second screen as below:

    Patch(
    Family,
    LookUp(Family, Name="The value you typed within the TextInput1 box in your first screen"),
    {
    Mother: TextInpu4.Text,
    Father:TextInput5.Text,
    Children:TextInput6.Text
    }
    )

    In addition, you could also consider store the record created in your first screen into a global variable within your app, and then use it within your second screen. I have made a test on my side, please take a try with the following workaround:

    Set the OnSelect property of the "Submit" button within your first screen to following formula:

    Set(
     CurrentRecord,
     Patch(
     Family,
     Defaults(Family),
     {
     Title:New, 
     Name: TextInpu1.Text, 
     Contact_x0020_No:TextInput2.Text, 
     Birthday:TextInput3.Text
     }
     )
    )

    Modify your formula within your second screen to following:

    Patch(
     Family,
     CurrentRecord,
     {
     Mother: TextInpu4.Text, 
     Father:TextInput5.Text, 
     Children:TextInput6.Text
     }
    )

    More details about the Patch function, please check the following article:

    Patch function

     

    Best regards,

    Kris

     

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 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard