web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing

(1) ShareShare
ReportReport
Posted on by 17
Hi everyone,
I'm working on updating a Comments field in my SharePoint list (Citizens PM List Tracker) from Gallery4 in Power Apps. I've added a Text Input (named txtinputComments) control inside the gallery to display and edit the Comments column (which is named exactly that in SharePoint).
Originally, I set the column in SharePoint as multiline, but have since changed it back to single line to rule out formatting issues. In Power Apps, I also ensured the Text Input is set to single line.
Here's the issue I'm running into:
  • When I reference Gallery4.Selected.Comments, it works — even though the Text Input is inside the gallery (I am inserting this under Type properties).
  • But when I use ThisItem.Comments, I get the following error:
    “ThisItem currently uses scope, which is not presently supported for evaluation.”
I tried setting:
 
powerappsCopyEditDefault = ThisItem.Comments
Text = ThisItem.Comments
But neither worked.
For saving the update, I tried the following Patch function on OnChange:
 
powerappsCopyEditPatch(
    'Citizens PM List Tracker',
    ThisItem,
    {
        Comments: txtComments.Text
    }
)
Unfortunately, that didn’t update the list. I also tried a broader patch using a Save button for OnSelect properties (placed the button outside of my gallery; button named buttonSave):
 
powerappsCopyEdit//Patch('Citizens PM List Tracker', Defaults('Citizens PM List Tracker'),
//{Status: DropdownStatus, 'Completion Date': CompletionDate, Comments: txtComments, 'Assigned To': cmbAssignedTo})
That also failed, so I tried:
 
powerappsCopyEditPatch(
    'Citizens PM List Tracker',
    Gallery4.Selected,
    {
        Comments: txtComments.Text
    }
)
Still no luck.
Any ideas what I might be missing? I'm open to suggestions - even if using Update is better than patch! I am still a beginner to this. Thanks in advance for your help.
This is my Gallery4 view:
 
Variables displayed on Gallery (unsure if this helps):
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,827 Super User 2025 Season 2 on at
    Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing
    Did you refresh the SharePoint connection in Power Apps after making the change to the SharePoint structure?
  • Michael E. Gernaey Profile Picture
    51,133 Super User 2025 Season 2 on at
    Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing
     
    Can you please share where you are using
    ThisItem.Comments exactly
     
    What is this? powerappsCopyEditDefault 
     
    You have so much stuff. Please refrain from adding tons of details like the above. Let's focus on one thing at a time.
     
    You are saying ThisItem.Comments doesn't work
    Where are you placing that expressionn
     
    Please share a picture etc. Always share photos. 
    Also share a photo of it with the Error so we can see what property you are doing it in
     
    Explaining isn't really going to help because we need to see it, and with all the other information it gets clouded.
     
    Saving isn't the issue atm. Its the error on the Expression. 
  • MS.Ragavendar Profile Picture
    4,184 Super User 2025 Season 2 on at
    Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing
     
    Since you mentioned the change of data type in the schema, Just remove the datasource from the powerapps and try adding it back once. 
     
    Sometimes cache issue might be causing this interim problem. 
     
    Also describe the problem effectively with the screenshots as per the @Michael E. Gernaey suggestion which helps us.
     
    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
  • JH-02040138-0 Profile Picture
    17 on at
    Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing
     
    Hi, sorry about that. Please let me know if this is better.
     
    I added ThisItem.Comments to the text input field I added in my Gallery4 (see below). The error says the formula uses scope, which is not presently supported for evaluation (which is why I tried using the formula Gallery4.Selected.Comments which works, but I beleive is incorrect because this text box is inside my Gallery4, not outside).
     
     
    I put this Patch formula for the text input box under OnChange which returned the error below (type of argument 'filed_6' does not match the expected type 'Text. Found type error.
     
    Patch(
        'Citizens PM List Tracker',
        ThisItem,
        {
            Comments: txtComments.Text
        }
    )
     
  • JH-02040138-0 Profile Picture
    17 on at
    Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing
    Hi, thanks for your replies. I did disconnect the data connection and readded it. Prior to that I did refresh the source. The comments do appear in the section from SharePoint, but the issue is it does not update or save when I make changes in the text input. Below, I replied to Michael E. Gernaey with what I hope is a better explanation that my original comment.
     
    I tested the changes in Power Apps (there's an obvious error lol image on the left side) and when refreshed, it does not display in my SP list like the other columns (SP list screenshot on right):
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    51,133 Super User 2025 Season 2 on at
    Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing
     
    Ok... there are multiple things going on here but this first.
     
    You are using the Modern Input so if you want to grab the text value its
     
    txtInputComments.Value, not txtInputComments.Text
     
    lets start with that
     
    however, since you are in the OnChange of the Control itself you can put
     
    Comments: Self.Value
     
    in place of that txtInputComments.Text
     
  • JH-02040138-0 Profile Picture
    17 on at
    Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing
     
     
     
  • JH-02040138-0 Profile Picture
    17 on at
    Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing
     
     
    When I enter this 
    Comments: Self.Value OnChange, it's not recognizing the Comments column despite that being what it's called. 
     
     
    And when I enter: into Value, there is an error in the formula
    txtinputComments.Value 
    saying Data type: Text. 
     
     
     
  • Michael E. Gernaey Profile Picture
    51,133 Super User 2025 Season 2 on at
    Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing
    So let's work on the first issue because we are getting worse and please make sure to always share a whole picture of the entire patch as I dont see a bunch of stuff around the Comments: failure
     
    Is the rest of the expression there.
     
    Also, please, click on the Control and tell me exactly, is it a Classic or Modern Text Input.
     
     
     
     
  • Suggested answer
    JH-02040138-0 Profile Picture
    17 on at
    Text Input (ThisItem.Comments) Inside Gallery Not Updating SharePoint Field (Patch Failing
    Understood, thank you for your help! However, I ended up figuring it out yesterday. I am using modern text input placed inside a gallery and upon further research I assigned a variable (varComment) to store the value for later use. For anyone who may stumble upon this post, I resolved the issue using:
     
    For the Value, I entered:  
     
    ThisItem.Comments
     
    Under OnChange, I entered:
     
    Set(varComment, txtinputComments.Value)
     
    and for the Save button outside of my Gallery4, I entered: 
     
    Patch(
       'Citizens PM List Tracker',
        Gallery4.Selected,
        { Comments: varComment }
    )
     
    (Anyone who reads this, please keep in mind this works because I am using it to only edit one item at a time, hence the use of only one variable varComment).

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 835 Most Valuable Professional

#2
developerAJ Profile Picture

developerAJ 465

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 452 Super User 2025 Season 2

Last 30 days Overall leaderboard