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 / Write contents of mult...
Power Apps
Unanswered

Write contents of multi-line text "comments" fields back to SP list "Comments" column

(0) ShareShare
ReportReport
Posted on by 17
I have a SP list connected to a canvas app to be used as a request form. The list has a multi-line text column/field named Comments. Each request type has its own screen and fields but the Comments field is the same on each screen.  Those app Comments fields (four of them) need to write back to the one Comments column on the list. I've tried using Collect but it's not working so far. The job aids I've found always reference using datacardname.Text but my data cards only have Value as an option. Is that creating the problem?
 
This is a "Save and Continue" button on each screen. The OnSelect for each button contains code based on that data card and screen name:
 
Collect(CommentsCollection, {Comment: dcPMComments.Value});
Navigate(scrCreditCheck) // Navigate to the next screen
 
 
Then on the last screen there is a "Submit Request" button that patches all of the forms back to the list, sends the comments collected to the current item, and clears the collection. But the Comments part isn't working.
 
Patch(
    'Commercial Solutions Support Requests',
    Defaults('Commercial Solutions Support Requests'),
    frmPMAssignment.Updates,
    frmRequestType.Updates,
    frmCreditCheck.Updates,
    frmMasteringData.Updates,
    frmCDA.Updates
);
Set(ConcatenatedComments, Concat(CommentsCollection, Comment & " ", " "));
Patch(
   'Commercial Solutions Support Requests',
   LookUp('Commercial Solutions Support Requests', ID = frmRequestType.LastSubmit.ID),
   {
       Comments: ConcatenatedComments
   }
);
Clear(CommentsCollection);
Navigate(scrSuccess)
 
Any insights or ideas is much appreciated.
Categories:
  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at
    A couple of things here - I believe your issue is that SharePoint already has a Comments column, except you cannot see it from Power Apps. Create a new field with a different name (I call mine Notes) and do this
    Patch(
       'Commercial Solutions Support Requests',
       Defaults('Commercial Solutions Support Requests'),
       frmPMAssignment.Updates,
       frmRequestType.Updates,
       frmCreditCheck.Updates,
       frmMasteringData.Updates,
       frmCDA.Updates
    );
    With(
       {   
          _Comments: 
          Concat(
             CommentsCollection, 
             Comment, 
             " "
          )
       },
       Patch(
          'Commercial Solutions Support Requests',
          {
             ID: frmRequestType.LastSubmit.ID,
             Notes: _Comments
          }
       )
    );
    Clear(CommentsCollection);
    Navigate(scrSuccess)
     
    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    Buy me a coffee

     
  • cwesthaven Profile Picture
    17 on at
    Thank you! So close! It's writing back to the list now, but it's creating a new line item just for the comments (Summary of Request). Any idea why?
     

    Patch(
        'Commercial Solutions Support Requests',
        Defaults('Commercial Solutions Support Requests'),
        frmPMAssignment.Updates,
        frmRequestType.Updates,
        frmCreditCheck.Updates,
        frmMasteringData.Updates,
        frmCDA.Updates,​​​​​​​
    );
    With(
        {
            _Comments: Concat(
                CommentsCollection,
                Comment,
                " "
            )
        },
        Patch(
            'Commercial Solutions Support Requests',
            {
                ID: frmRequestType.LastSubmit.ID,
                'Summary of Request': _Comments
            }
        )
    );
    Clear(CommentsCollection);
    Navigate(scrSuccess)
  • ronaldwalcott Profile Picture
    3,914 Moderator on at
    At a quick glance it looks as if the second Patch is not writing to the updated record table.
    Patch(
            'Commercial Solutions Support Requests',
            {
                ID: frmRequestType.LastSubmit.ID,
                'Summary of Request': _Comments
            }
        )
     
    Should be similar to your previous code. You need a lookup here 
     
    LookUp('Commercial Solutions Support Requests', ID = the id value of the last submitted record in the table to be updated
  • WarrenBelz Profile Picture
    156,956 Most Valuable Professional on at
    Did you actually submit the Form ? A Patch(Form.Updates) action does not constitute a submission and therefore there is no actual LastSubmit value available. You may have to Submit one and then Patch the updates and the comments OnSuccess of the Form, so firstly
    SubmitForm(frmRequestType)

    then OnSuccess of frmRequestType
    With(
       {
          _Comments: 
          Concat(
             CommentsCollection,
             Comment,
             " "
          )
       },
       Patch(
          'Commercial Solutions Support Requests',
          LookUp(
             'Commercial Solutions Support Requests',
             ID = Self.LastSubmit.ID,
          ),
          frmPMAssignment.Updates,
          frmRequestType.Updates,
          frmCreditCheck.Updates,
          frmMasteringData.Updates,
          frmCDA.Updates,
          {'Summary of Request': _Comments}
        )
    );
    Clear(CommentsCollection);
    Navigate(scrSuccess)

    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    Buy me a coffee


  • cwesthaven Profile Picture
    17 on at
    Ok, I see. Thanks so much for pointing that out. I'll need to rethink my app logic. You've been a big help...thanks again!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard