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 / Patch variables to sha...
Power Apps
Answered

Patch variables to sharepoint

(0) ShareShare
ReportReport
Posted on by 95

I am struggling to get a patch to sharepoint to work. See code below

 

Patch(Mentors_2,Default(Mentors_2),{ScoreNew:ScoreNew.value,ScoreSpec:ScoreSpec.value,ScoreEx:ScoreEx.value, ScoreT:ScoreT.value, ScoreO:ScoreO.value, ScoreP:ScoreP.value, ScoreS:ScoreS.value});Navigate(Home)

 

Where I have title of the sharepoint table matching the name of the variable but it is giving me an error.

 

Invocation of unknown or unsupported function 

 

Can you help with this?

Categories:
  • WarrenBelz Profile Picture
    156,586 Most Valuable Professional on at

    Hi @lmahmuti ,

    You might try a Capital V for Value, but where are you patching the Variable?

    If it is a variable, you do not need .Value

    Patch(
     Mentors_2,
     Default(Mentors_2),
     {
     ScoreNew:ScoreNew.Value,
     ScoreSpec:ScoreSpec.Value,
     ScoreEx:ScoreEx.Value, 
     ScoreT:ScoreT.Value, 
     ScoreO:ScoreO.Value, 
     ScoreP:ScoreP.Value, 
     ScoreS:ScoreS.Value
     }
    );
    Navigate(Home)

     

    Please click Accept as solution 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 giving it Thumbs Up.

     

  • mdevaney Profile Picture
    29,993 Moderator on at
    @Imahmuti
    Please show a screenshot of the code in your formula bar that is underlined.
  • lmahmuti Profile Picture
    95 on at

    Hi Warren,

     

    I am patching them to sharepoint Mentors_2. Tried removing the value suffix but still the same error

     

  • lmahmuti Profile Picture
    95 on at

    Attached screenshot

    Patch.PNG
  • mdevaney Profile Picture
    29,993 Moderator on at
    ...
  • mdevaney Profile Picture
    29,993 Moderator on at
    @Imahmuti
    Change this code

    Default(Mentors_2)

    Into this code

    Defaults(Mentors_2)

    —-
    Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
  • WarrenBelz Profile Picture
    156,586 Most Valuable Professional on at

    Hi @lmahmuti ,

    Sorry, focusing on one issue around Variables and posted your code in and missed the obvious first one - @mdevaney picked it up.

    Patch(
     Mentors_2,
     Defaults(Mentors_2),
     {
     ScoreNew:ScoreNew.Value,
     ScoreSpec:ScoreSpec.Value,
     ScoreEx:ScoreEx.Value, 
     ScoreT:ScoreT.Value, 
     ScoreO:ScoreO.Value, 
     ScoreP:ScoreP.Value, 
     ScoreS:ScoreS.Value
     }
    );
    Navigate(Home)

     

  • lmahmuti Profile Picture
    95 on at

    Now I am getting Patch has some invalid arguments

    SubmitForm(Form6);If(DataCardValue23.Selected.Value = "Mentor a new hire", Set(ScoreNew, ScoreNew+1));If(DataCardValue23.Selected.Value = "Mentor a specific employee", Set(ScoreSpec, ScoreSpec+1));If(DataCardValue23.Selected.Value = "Mentor an experienced employee seeking direction", Set(ScoreEx, ScoreEx+1));If(DataCardValue48.Selected.Value = "Provide technical guidance", Set(ScoreT, ScoreT+1));If(DataCardValue48.Selected.Value = "Provide operational guidance", Set(ScoreO, ScoreO+1));If(DataCardValue48.Selected.Value = "Provide progression guidance", Set(ScoreP, ScoreP+1));If(DataCardValue48.Selected.Value = "Provide soft skill guidance", Set(ScoreS, ScoreS+1));

     

    Patch(Mentors_2,Defaults(Mentors_2),{ScoreNew:ScoreNew,ScoreSpec:ScoreSpec,ScoreEx:ScoreEx, ScoreT:ScoreT, ScoreO:ScoreO, ScoreP:ScoreP, ScoreS:ScoreS});NewForm(Form6); Navigate(Home)

  • mdevaney Profile Picture
    29,993 Moderator on at
    There’s no way for us to solve this issue for you directly. You have to remove all the arguments from PATCH then add them back one by one. You’ll know which field is causing the error by doing this.

    —-
    Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
  • lmahmuti Profile Picture
    95 on at

    I am getting super close to resolution. My last error is Title:Field 'Title' is required. IconAccept1.OnSelect.

     

    I have the mandatory Title column in sharepoint so not sure how to resolve this

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard