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 / Saving POwer Apps Data...
Power Apps
Answered

Saving POwer Apps Data to existing Sharepoint List

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a Power App linking to a Sharepoint List.  It is creating new records all fine but when I go to update an existing record based on RECORDID I get an error stating (These types cannot be compared: Control, Text)

Any help would be appreciated.

 

My code on my UPDATE button: (OnSelect)

eg:

Patch(SPList, LookUp(SPList, Recordid="123456"), { Field1: Field2000 } )

 

SPList = Sharepoint List Name, Recordid is what I want to lookup from the existing records.

Field1 is the field in the SPList that I want to update by what has been inputted/changed on the PowerApp for Field2000 value.

 

Thanks.

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    The problem is in the lookup...

     

    LookUp(SPList, Recordid="123456")

     

    That RecordId, which type of field is?

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Nogueira1306 

    Recordid is a text file whereas the Field1 (in SP list) and Field2000 (in Powerapp) are both Numbers.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    You are trying to get the recordid from a file??

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Nogueira1306 
    Recordid is the field column of the sharepoint list.  That part is working, It updates if I set the following:

    Patch(SPList, LookUp(SPList, Recordid.Text="123456"), { Field1: 9 } )
    This sets the Field1 column in the sharepoint list to a value of 9 (number field) from the record recordid=123456.  I have this part working but I need it to grab the inputted data to be updated to the SPList rather than setting '9'.  So whatever is typed into Field2000 on the PowerApp form updates Field1 in the SPList - does that make sense?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    To add:

    Patch(SPList, LookUp(SPList, Recordid.Text="123456"), { Field1: Field2000 } )

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    The error message is telling you that you have a wrong data type for the Field1, so I assume Field2000 is the name of a Control like TextInput box, you will need to use the text from in this control rather than the control name:

    Patch(SPList, LookUp(SPList, Recordid.Text="123456"), { Field1: Field2000.Text } )

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard