Notifications
Announcements
The comments field is at the bottom and I've added a text input on top of it. What should I enter into the settings or what code should I use to make sure that the text/comments a user enters is saved to each record when someone clicks on the record in the SharePoint list and also so that the comments are displayed in the approval notification in my workflow to the approver?
Hi @MN003 ,
Your best approach will be something along the lines of submitting the form first and then submitting the text field to that record.
The code on your submit button will then look something like this:
SubmitForm([FORM_NAME_HERE]); Patch( [DATA_SOURCE_NAME_HERE], [FORM_NAME_HERE].LastSubmit, { [COLUMN_NAME_HERE]: [TEXT_INPUT_NAME_HERE].Text } )
@MN003
Is there any reason that you would not just have your comments as part of the form? Then it will submit with each record.
Hi @MatthewInwards ,
Thank you so much for replying, this is what I'm seeing so far with the code: (Any suggestions?)
@RandyHayes I think I did try that approach but I was unsuccessful or maybe I did something incorrectly when the form submitted and no text was showing in the record during my test. Sorry, I'm still trying to learn the the best approaches for this case.
Yes, so you would simply need to add the Comments field to your form in the Edit fields of the form.
There really isn't anything else you need to do.
Remove the [] from the code. I only put those there to hold the place while trying to show you the code
Gotcha, I removed those and was able to publish the form with the code. I still seem to get a blank comments box below. The comments also don't appear in a test email I set up or in the approval notification. 😞
So to be clear...does your list have a column called Comments in it?
Have you tried to add that to your form?
@RandyHayes Sure, so my SP list has a field I created called CPComments, but not a specific field named Comments. I can try to recreate the field again but I've had no luck previously.
So have you simply checked on the CPComments field in the field chooser to add it to your form??
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 739 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 268