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 Statement has in...
Power Apps
Answered

Patch Statement has invalid Arguments

(0) ShareShare
ReportReport
Posted on by 68

Hi All. This Patch statement fails and it says the patch statement has an invalid argument:-

ForAll(QuestionTemplate, Patch(JobItems, {Q1: QuestionTemplate.Q1}))

 

However this is ok:  ForAll(QuestionTemplate, Patch(JobItems, {Q1: "Hello World"}))       so its I believe then formula is not seeing QuestionTemplate.Q1 as a text input when it is.

 

QuestionTemplate.Q1 and JobItems.Q1 are both columns in a SharePoint list of type 'single line text'

I have also tried ForAll(QuestionTemplate, Patch(JobItems, {Q1: Text(QuestionTemplate.Q1}}))  but that does not work either.

 

Help!

 

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at
    ForAll(QuestionTemplate, Patch(JobItems, {Q1: QuestionTemplate.Q1}))
    Please note that Q1 should be your columnName in your list and QuestionTemplate should be the name of the textbox on your form or screen. If what I have said is the case then your formula should be:
    Patch(JobItems, {Q1: QuestionTemplate.Text}))

    Your comments are welcome
    If you like this post give thumps up. If it resolved your question then mark as a solution.
  • CliveMM Profile Picture
    68 on at

    Hi Eka24, Thank you for your response, However I am updating without and screen controls, just moving rows from one share point list to the other. I had forgotten the defaults but I have added them now but still  get the same error

     

    ForAll(QuestionTemplate, Patch(JobItems,Defaults(JobItems), {Q1: QuestionTemplate.Q1}))

     

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @CliveMM ,

    Do you want to update JobItems's Q1 field by using the data of Q1 field in QuestionTemplate?

    If so, I suggest you use [@] to avoid ambiguity。

    Try this formula:

    ForAll(QuestionTemplate, Patch(JobItems, {Q1: QuestionTemplate[@Q1]}))

     

     

    Best regards, 

  • eka24 Profile Picture
    20,925 on at
    Main issue has to do with the QuestionTemplate.Q1 portion of the formula. Try this
    ForAll(QuestionTemplate, Patch(JobItems,Defaults(JobItems), {Q1:Q1}))
  • CliveMM Profile Picture
    68 on at

    Fantastic - Thank you so much

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 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard