web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / html within datacard f...
Power Apps
Answered

html within datacard from SharePoint announcement app

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

card.jpg

I have an announcement sharepoint list. When I added the Body field to the datacard, html shows up; it does not show up in SharePoint. How can I remove it?

Categories:
  • nickduxfield Profile Picture
    497 on at

    Swap out the control for a HTML control, as the body column from this content type should be rich text (HTML).

  • Verified answer
    v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi Lp939,

     

    Please try to replace the label with a HTML text control.

     

    Then set the HTML text control’s text property as ThisItem.ColumnName.

     

    Please try it on your side, hope it will work for you.

    Best regards,
    Mabel Mao

     

  • CayoSonia Profile Picture
    18 on at

    Cannot add an HTML control to a Datacard unless I missing something so for me this question is not solved. Any ideas?

  • JGOUPIL Profile Picture
    4 on at

    Hey CayoSonia,

    Have you handled your problem ?

     

    I have the same one. People who have filled multi-lines text to SharePoint with carriage returns and things so I have HTML tags in my DataCard.

     

    I can create a new DataCard,

    - add a HTML Label with text based on the ValueDataCard

    - add a Text Label with text based on the KeyDataCard

     

    But it is not very easy... Another idea ?

  • CayoSonia Profile Picture
    18 on at

    In the end I had to do something quite clunky and only put the sharepoint titles, submit/modify dates in the form. I then added a comment icon which navigated to a new screen, the new screen had the gallery control and I could add the list comments in an HTML text box. There might be a better way but I am a bit of a noob at this and the HTML markup had to go. Good luck!

  • Dave Potts Brit Eng Profile Picture
    167 on at

    I had the same problem. To display the HTML text I had to:

     

    1. Give up using DataForms/DataCards
    2. Use the HTML Text Label as suggested above
    3. Set the label's HTMLText value to the selected item from the Gallery I had just navigated from, i.e. BrowseGallery1.Selected.Description

    Regards, Dave.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @DavePotts_BritE 

    When you add your Html column/field to an EditForm, just select the Control type in the Fields definition and make it "Edit Rich Text".  This will give you the proper control to handle the Html.  By default it assigns an Edit Text control...which is just plain text.

    Hope this simplifies things for you.  If not and you still have questions, you might want to post back in a new thread - as this one is a bit old.

  • Dave Potts Brit Eng Profile Picture
    167 on at

    @RandyHayes , thanks for the reply. I tried the "Edit Rich Text" control but I couldn't find a way to remove the tool bar at the top of the control. I need to display the contents as rendered HTML but don't want any edit controls.

     

    I.e., how do I get rid of this in the image below?

     

    richtextcard.png

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @DavePotts_BritE 

    You could go with "View Rich Text" - However, this does not get rid of the toolbar on the control, it just disables it.

    If you want to get rid of those controls, then really your only choice is to unlock the datacard, delete the Rich Text Edit control, and insert an HtmlText Control.  Then set its HtmlText property to Parent.Default.

    That will give you a read-only view of the Html data.

  • Dave Potts Brit Eng Profile Picture
    167 on at

    Thanks @RandyHayes . It was the "unlock" step that I was missing Smiley Happy

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard