cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

HTML code in comment datacard (in View displaymode)

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?

1 ACCEPTED SOLUTION

Accepted Solutions
davidstone
Level 8

Re: HTML code in comment datacard (in View displaymode)

5 REPLIES 5
davidstone
Level 8

Re: HTML code in comment datacard (in View displaymode)

OneThing
Level 8

Re: HTML code in comment datacard (in View displaymode)

Hi @lumberjacklurch

 

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.

 

Capture1.PNG

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.

 

Thanks,

Nicky

KOM_4410
Level 8

Re: HTML code in comment datacard (in View displaymode)

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.

 

davidstone
Level 8

Re: HTML code in comment datacard (in View displaymode)

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!

Re: HTML code in comment datacard (in View displaymode)

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:

 

If(IsBlank(txt_CommentsValue),"",(PlainText(txt_CommentsValue.Text)))

 

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".

 

Thanks everyone!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

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