Create your OWN Appending Comments in PowerApps

Описание к видео Create your OWN Appending Comments in PowerApps

Want to have a comments section in your Power App and also keep all the old comments plus the user name? This was a requirement in one of my projects.

We use a SharePoint multi-line text field to store the comment data. We even add our own HTML to bolden our name an italic the comments.

My name is Andrew Hess and this is a Power Apps tutorial.


New Comment, on One Screen:
Patch(
MyComments,
{
Title: TextInput2.Text,
theComments: Now() & " - " & "<b>" & User().FullName & "</b>" & " " & "<i>" & RichTextEditor1.HtmlText & "</i>"
}


Patch Comment, on One Screen:
Patch(
MyComments,
Gallery1.Selected,
{theComments: Now() & " - " & "<b>" & User().FullName & "</b>" & " " & "<i>" & RichTextEditor1.HtmlText & "</i>" & HtmlText1.HtmlText}
)

When using 2 screens, you can define a variable to tell the screen whether you are in Edit Mode or in New Mode.

Combined Patch Comments Button on both Screens:
If(
varNewForm,
Patch(
MyComments,
{
Title: TextInput2.Text,
theComments: Now() & " - " & "<b>" & User().FullName & "</b>" & " " & "<i>" & RichTextEditor1.HtmlText & "</i>"
}
);Navigate(Screen1,Fade);,
Patch(
MyComments,
Gallery1.Selected,
{theComments: Now() & " - " & "<b>" & User().FullName & "</b>" & " " & "<i>" & RichTextEditor1.HtmlText & "</i>" & HtmlText1.HtmlText}
)
);


Chapters:
0:00 Introduction
1:19 SharePoint with Comments
2:57 Starting our Power App
4:35 Writing the Patch Statement
7:32 Writing our own HTML in our Comment
10:55 Writing a new comment using 1 Screen
13:44 Adding a Second Screen to our Power App
15:53 If A New Form Then "Do This"
18:00 Using Patch for our 2 Screen Comments
20:10 Making Title and Comments Required

Комментарии

Информация по комментариям в разработке