cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MN003
Helper III
Helper III

How do I setup my PowerApps form's comments field correctly?

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?Power Apps Form.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@MN003 

Not surprising - there is a LOT of bad advice out there on PowerApps!!

 

To add the fields in a form, you simply select them in the field chooser of the form.  You can change the control type as well (for example you want a dropdown instead of a text input, or html input rather than plain text, etc.)

 

Keep it simple!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

38 REPLIES 38
MatthewInwards
Resolver II
Resolver II

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
    }
)
RandyHayes
Super User III
Super User III

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi @MatthewInwards ,

 

Thank you so much for replying, this is what I'm seeing so far with the code: (Any suggestions?)

MN003_0-1620323935727.png

 

@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.

RandyHayes
Super User III
Super User III

@MN003 

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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

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. 😞

 

MN003_0-1620744684826.png

 

RandyHayes
Super User III
Super User III

@MN003 

So to be clear...does your list have a column called Comments in it?

Have you tried to add that to your form?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
MN003
Helper III
Helper III

@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.

 

MN003_0-1620750699495.png

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,798)