I've got a gallery that I'm using to display records of a SharePoint list. I set up a form to display the selected item of the gallery. Each record has a Comments record. When you look at the comment section in the form, it looks like HTML code surrounds the comment text.
<div class="ExternalClass5AD190788D6F4877A3F99B12A64E1CE7">My comment</div>
Is there a way to get rid of the code?
Solved! Go to Solution.
Following on from the last post if you also have some formatting you need to keep or images etc you can get around this if you can add a new HTML Text Box and have the HTMLText Attribute point to your DataCardValue.
From here you can then place the HTMLText box in the correct place on your form and set your DataCardValue's visible attribute to false. You will have an issue with the box not following the form of you change size etc. but it will allow you to display the information in a readable format.
I didn't know about the PlainText function...thanks @davidstone!
What I use to do when I was too lazy to change all the text box to Html text boxes was to edit the properties of the column in the Sharepoint list so it doesn't allow rich text. That use to solve that problem.
That'll work too.
As an extension on your original approach, I wonder if you could have used a HTML label but hidden it, and then created an ordinary label with the value set to 'YourHTMLLabel.Text'
But wrapping it in a PlainText is definitely easier!
Thank you all for the replies! I tried wrapping it in the Plaintext function, but when I would recall a record where the Comments column was empty, it would display "Show html code here" (or whatever the default is). To get around THAT, I put it in an If(IsBlank function:
Now it works like a charm. I should also mention that removed the original textbox in the datacard and replaced it with a HTML Text "box".
Check it out!
Check it out!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand