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.

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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,567)