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):