cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Patron
Post Patron

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
Highlighted
Kudo Kingpin
Kudo Kingpin

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

5 REPLIES 5
Highlighted
Kudo Kingpin
Kudo Kingpin

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

Highlighted
Continued Contributor
Continued Contributor

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

Highlighted
Resolver II
Resolver II

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.

 

Highlighted
Kudo Kingpin
Kudo Kingpin

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!

Highlighted
Post Patron
Post Patron

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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