Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Suggested answer

Error will occur when using Patch to update

(1) ShareShare
ReportReport
Posted on by 49

I drafted a OnSelect action to update the value in gallery to the actual sharepoint like like above.
There is no error when draft.
However, it showed error when really run it.
"Error when trying to retrieve data from the network: Fetching items failed. Possible invalid string in filter query. clientRequestId: 84ab018b-456a-40f6-87e7-c576811d0f88 serviceRequestId: 6633a2a1-7004-5000-4346-82d04308dffe"
I checked that I have full control access to the list.

And it is work if I hardcode the ThisRecord.ID to an ID.


 
  • Suggested answer
    CA1105 Profile Picture
    469 on at
    Error will occur when using Patch to update
    Try to use Value function in ThisRecord.ID
  • Suggested answer
    MS.Ragavendar Profile Picture
    2,115 on at
    Error will occur when using Patch to update
     
    A quick follow-up to see, does the suggestion worked for you or still you were looking for any other approaches or assistance.
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
     Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
  • WarrenBelz Profile Picture
    147,547 Most Valuable Professional on at
    Error will occur when using Patch to update
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • WarrenBelz Profile Picture
    147,547 Most Valuable Professional on at
    Error will occur when using Patch to update
    Firstly @MS.Ragavendar is on the right track here - the As disambiguation operator is a more reliable syntax. Also ForAll is not designed to be a loop, although it can act that way if it contains an action inside it. ForAll creates a Table, which can be Patched in one action to the data source and will run much faster than individual Patches for each record. If it contains the ID of each record, it will update the specific records, if not it will create new records. 
    Patch(
       'Project Task',
       ForAll(
          Gallery1_1.Allltems As _Data,
          {
             ID: _Data.ID,
             Title: _Data.TextlnputCanvas11.Value,
             Status: {Value: First(_Data.DropdownCanvas3_l.Selectedltems).Value}, 
             'Target Date': _Data.DatePickerCanvasl_l.SelectedDate,
             'Actual Completed Date': _Data.DatePickerCanvas2_l.SelectedDate, 
             Remarks : _Data.TextInputCanvas2_l.Value
          }
       )
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • Suggested answer
    MUK-Usman Profile Picture
    2 on at
    Error will occur when using Patch to update
    Hey, 
     
    Its probably because you are using ThisRecord inside lookup i.e ThisRecord is referencing the ID that should be returned from Lookup condition.
     
    Try this:
     
    First, collect the ID in a new collection inside Forall,
     
    Then reference the ID by using Last(Collection-Name).ID in the Lookup condition.
     
    Please mark this as answer if its solves your problem.
     
    Thanks,
    Regards,
    Muhammad Usman Khan
  • Suggested answer
    MS.Ragavendar Profile Picture
    2,115 on at
    Error will occur when using Patch to update
     
    Try this,
     
    ForAll(Gallery1_1.AllItems As PatchData,
    Patch('Project Task',
    Lookup('Project Task', ID =PatchData.ID),
    {
    column:control value
    });
     
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.

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

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics