cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sheila33496
Frequent Visitor

How to count remaining characters for a Rich Text box

I have a Powerapps SharePoint List Form. On the form I have a Rich Text field that works perfectly and brings in the Rich Text into SP which is what the user is requesting. However, they also want to have a character count which I have and which works if the I was only using a plain text field. The character count field (characters remaining) doesn't work on rich text or a plain text whose default is the Rich Text because it counts all the HTML code in the background. Does anyone have a workaround for this?

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@sheila33496 

If you're just trying to count characters and ignore the html, then change your formula to:

   Len(PlainText(yourInput.Text))

 

That will remove all the html and count them as you want.

 

I hope this is helpful for you.

_____________________________________________________________________________________
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

CNT
Super User
Super User

@sheila33496 Try this,

Len(PlainText(yourHtmlText))

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@sheila33496 

If you're just trying to count characters and ignore the html, then change your formula to:

   Len(PlainText(yourInput.Text))

 

That will remove all the html and count them as you want.

 

I hope this is helpful for you.

_____________________________________________________________________________________
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

CNT
Super User
Super User

@sheila33496 Try this,

Len(PlainText(yourHtmlText))

View solution in original post

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.

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,047)