cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Unable to add comment for Gallery item

Hi Power Apps Community,

Issue: I have a list of items in a Gallery. I would like to add a comment for each Gallery item. Before the comment is made, the details for the Gallery item is Patched the SharePoint

When you click on the 'Comment' icon, a pop-up appears - using UpdateContext, which has a Rich-text editor input. 

With the data already Patched to SharePoint, I assume that I would need to lookup the record in SharePoint, and the Patch the Update for the comment to the relevant line item.

Capture.JPG

I would really appreciate any assistance on this.

Thank you in advance.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Unable to add comment for Gallery item

Hi @Data_Enthusiast ,

Assuming the gallery Items is based on the relevant SP list, you would do this after typing the comment (I assume you have a save button on the pop-up)

UpdateIf(
   YourSPListName,
   ID=YourGalleryName.Selected.ID
   {YourSPCommentField:YourPopupTextField.Text}
)

 

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.

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Unable to add comment for Gallery item

Hi everyone, in addition to the identified solution, I have also come up with another work-around.

I created another SharePoint list specifically for holding data around the comments. 

To ensure that a relationship is created between the comments list and the transaction list, I store the session id in both lists as well.

Hope this will also help out anyone facing a similar issue 🙂

View solution in original post

5 REPLIES 5
Highlighted
Community Champion
Community Champion

Re: Unable to add comment for Gallery item

Hi @Data_Enthusiast ,

Assuming the gallery Items is based on the relevant SP list, you would do this after typing the comment (I assume you have a save button on the pop-up)

UpdateIf(
   YourSPListName,
   ID=YourGalleryName.Selected.ID
   {YourSPCommentField:YourPopupTextField.Text}
)

 

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.

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Unable to add comment for Gallery item

Hi @WarrenBelz 

Correct, I have a pop-up for the comment.

I tried the script provided, but was unsuccessful. The ID that is looked up in the Gallery is from another SharePoint list, and not the List where the data is Patched to.

The Gallery is referencing 'Master' list, whereas the list I am trying to Patch to is the 'Transaction' list.

Highlighted
Resolver I
Resolver I

Re: Unable to add comment for Gallery item

Hi @WarrenBelz 

This worked, I actually referenced my Gallery wrong. Once I made the update and updated your script provided with the naming conventions that I have, the Update worked 🙂 

Highlighted
Resolver I
Resolver I

Re: Unable to add comment for Gallery item

Hi everyone, in addition to the identified solution, I have also come up with another work-around.

I created another SharePoint list specifically for holding data around the comments. 

To ensure that a relationship is created between the comments list and the transaction list, I store the session id in both lists as well.

Hope this will also help out anyone facing a similar issue 🙂

View solution in original post

Highlighted
Community Champion
Community Champion

Re: Unable to add comment for Gallery item

Hi @Data_Enthusiast ,

Yes if you have a many (comments) to one (record) relationship, that is exactly how you should handle it. I am not sure what you refer to with Session ID, but I generally use the ID number of the "master" record n a field (I name it IDRef - call it whatever you want) in the "child" list.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (10,761)