Hi Community,
I have a rich text box comment in my powerapps and i want if i write a comment then click on save button, then it will patch that comment in my sharepoint list, i have a column called "comment" in my sharepoint.
Thanks.
Solved! Go to Solution.
Is this part of a form component or is it just on its own? If form then use Submit Form function, if its own component then use the Patch function. Something like:
Patch( DATASOURCE, Defaults(DATASOURCE), { Title: "ABC", comment: RichTextEditor1.HtmlText } )
Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.
LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
Twitter: https://twitter.com/phipps0218
I see yes of course, it creates a new line. But no problem. I thought you want it that way.
If you want to update with a comment, the Example text wuld be like this
Patch(
DATASOURCE,
LookUp(DATASOURCE, SEARCHCRITERIA),
{
comment: RichTextEditor1.HtmlText
}
)
That means if you want to update it absed on the title
Patch(
DATASOURCE,
First(LookUp(DATASOURCE, Title = "ABC")),
{
comment: RichTextEditor1.HtmlText
}
)
You could also always Update the First record with
First(DATASOURCE)
But that doesnt make much sense. (IT also has a really high delay)
I suggest you, to work with IDs or Title. You need at least a unique identifier.
To explain the Patch to you basically.
You need the Datasource, the record you want to modify and than what you want to modify.
Hope I could help you.
Is this part of a form component or is it just on its own? If form then use Submit Form function, if its own component then use the Patch function. Something like:
Patch( DATASOURCE, Defaults(DATASOURCE), { Title: "ABC", comment: RichTextEditor1.HtmlText } )
Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.
LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
Twitter: https://twitter.com/phipps0218
It ssems like a custom HTml text for that it would be
Patch(
DATASOURCE,
Defaults(DATASOURCE),
{
Title: "ABC",
comment: RichTextEditor1.HtmlText
}
)
Thanks for the feedback, the code works well but it create a new row each time i make a comment!
as you can see, my sharepoint list looks like that, and i want if i make any comment then the comment will be written in the first row (see where i make a comment). Thanks.
Patch(
DATASOURCE,
Defaults(DATASOURCE),
{
comment: RichTextEditor1.HtmlText
}
)
I deleted Title in the code because i do not want to create any other title
Name | comment |
XXX | Comment should be written here! |
XXX |
|
XXX |
|
XXX |
|
I see yes of course, it creates a new line. But no problem. I thought you want it that way.
If you want to update with a comment, the Example text wuld be like this
Patch(
DATASOURCE,
LookUp(DATASOURCE, SEARCHCRITERIA),
{
comment: RichTextEditor1.HtmlText
}
)
That means if you want to update it absed on the title
Patch(
DATASOURCE,
First(LookUp(DATASOURCE, Title = "ABC")),
{
comment: RichTextEditor1.HtmlText
}
)
You could also always Update the First record with
First(DATASOURCE)
But that doesnt make much sense. (IT also has a really high delay)
I suggest you, to work with IDs or Title. You need at least a unique identifier.
To explain the Patch to you basically.
You need the Datasource, the record you want to modify and than what you want to modify.
Hope I could help you.
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |