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

Format text to show BOLD in HTML Text

Hi,

I am using a HTML text box to append updates in a sharepoint form and to make it look better need to bold the user name and date before displaying the text.

 

htmlBox.PNG

Below the RichText Box is a HTML.Text box with this code:

 

If(Not(IsBlank(richTextUpdates.HtmlText)),User().FullName & " " & Now() & " " & richTextUpdates.HtmlText & Char(13))& ThisItem.Updates

 

Is there a way to within this code to make username and date bold ?

I used this video for append text workaround - https://www.youtube.com/watch?v=hzLEecSpmFo 

 

Thank you in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Mo_Islam ,

Based on the needs that you mentioned, I agree with @mdevaney 's thought almost. I think the <b> HTML Tag could achieve your needs.

 

Firstly, in order to the render the HTML text, please consider add a Html Text control in your app to display the "Updates" value. The screenshot of my app as below:

3.JPG

Set the HtmlText property of Html Text control to following:

"<b>" & User().FullName & "</b> <b>" & Now() &"</b>" & Char(13) & richTextUpdates.HtmlText

 

On your side, you need to set the HtmlText property of the Html Text control to following:

If(
   !IsBlank(richTextUpdates.HtmlText),
   "<b>" & User().FullName & "</b>  " & "<b>" & Now() & "</b>" & Char(13) & richTextUpdates.HtmlText & Char(13)
) & ThisItem.Updates

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
mdevaney
Super User
Super User

@Mo_Islam 

Like this...

If(Not(IsBlank(richTextUpdates.HtmlText)),"<b>"&User().FullName & " " & Now() & "</b> " & richTextUpdates.HtmlText & Char(13))& ThisItem.Updates

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

v-xida-msft
Community Support
Community Support

Hi @Mo_Islam ,

Based on the needs that you mentioned, I agree with @mdevaney 's thought almost. I think the <b> HTML Tag could achieve your needs.

 

Firstly, in order to the render the HTML text, please consider add a Html Text control in your app to display the "Updates" value. The screenshot of my app as below:

3.JPG

Set the HtmlText property of Html Text control to following:

"<b>" & User().FullName & "</b> <b>" & Now() &"</b>" & Char(13) & richTextUpdates.HtmlText

 

On your side, you need to set the HtmlText property of the Html Text control to following:

If(
   !IsBlank(richTextUpdates.HtmlText),
   "<b>" & User().FullName & "</b>  " & "<b>" & Now() & "</b>" & Char(13) & richTextUpdates.HtmlText & Char(13)
) & ThisItem.Updates

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you,

 

I used this line of code to modify the Default value of my DataCard and it works. The previous line is not necessary for my circumstance (and many others just need this line)

 

If(
   !IsBlank(richTextUpdates.HtmlText),
   "<b>" & User().FullName & "</b>  " & "<b>" & Now() & "</b>" & Char(13) & richTextUpdates.HtmlText & Char(13)
) & ThisItem.Updates

 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,878)