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 / Show Html Text Content...
Power Apps
Answered

Show Html Text Content Most Recent First

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

I have Form1.

I am using a Html Text box to display previously entered comments.

They are currently appearing oldest (top) to newest (bottom). 

I would like the most recent to appear first then the rest.

Phineas_0-1702667165797.png

 

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @Phineas 

    Without any info about the data there's no real way for anyone to give any real advice here. However, if your data is a long text string with some sort of character separation between different comments you could try

     

     - using Split() to get the data into a collection

    - then Sort that collection

    - then convert the sorted collection back into a string variable

    - then display this new variable in your html control

     

    ... just guessing tho ...

  • Phineas Profile Picture
    5,331 Moderator on at

    The returned html comments are formatted as follows -

     

    User().Fullname & Now() & RichTextEditor1.HtmlText})

  • EddieE Profile Picture
    4,641 Moderator on at

    @Phineas 

    That still makes no sense. I'd need to understand the data if you want any help

  • Phineas Profile Picture
    5,331 Moderator on at

    Can you tell me where to find what you are looking for - the "data"?

    I have a form with an html text box that users are entering comments into. Process is capturing the data using 'User().Fullname & Now() & RichTextEditor1.HtmlText})' in the collection and appending it to a SharePoint list.

    Those comments are returned to an 'Edit' form through a collection as part of the 'item/record' being pulled.

    It is unclear to me what else you seek. If you could clarify where I can find the information you seek, I will gladly provide it.

    Thank you,

  • EddieE Profile Picture
    4,641 Moderator on at

    @Phineas 

    Thanks, that gives me a bit of an idea of what's happening now.

     

    What type of field are the comments being stored in inside of SharePoint? Is it a Multi line of text field? If so, are you storing as Plain Text or Rich Text? All of this matters.

     

    Also, can you provide and example of data that you want sorted so I can see what it looks like.

     

    As I said above, if each comment is separated by some sort of delimiter then you can use Spilt() to create a separate collection of comments only that you can then process further and sort. I can't explain how until I see some actual data.

     

    As a sidenote, if you are using Rich Text inside a Multi line of text field then this can be a challenge to do what I'm suggesting above.

  • Phineas Profile Picture
    5,331 Moderator on at

    The column is currently set to 'Rich text...', though I believe this was by default. I don't foresee needing those capabilities for this comment process. I can change the setting to 'Plain Text', if it facilitates achieving the goal.

    Here is an example of two comments that                         Here is a column information
    need to be sorted by most recent.

    Phineas_0-1702945829449.pngPhineas_1-1702945885162.png

     

  • EddieE Profile Picture
    4,641 Moderator on at

    @Phineas 

    Thanks for this, it gives me an idea of what's inside your app. What I really need is example data from your list. An easy way to get this is select a record with more than one RequestComment then copy the comment field into a Text Editor like Notepad++. Then paste that here.

     

    It's also worth noting that if you change from Rich Text to Plain Text your field may get corrupted inside PowerApps ... not sure. It maybe worth just leaving for now until I see some actual data, not what it looks like in PowerApps

  • Phineas Profile Picture
    5,331 Moderator on at

     

    This is the same item from the SP List I sent previously.

    Phineas_1-1702953853416.png


    Here are those same comments in Sticky Notes (I don't have Notepad ++ on this loaner computer).

    >>Kevin 11/6/2023 9:09 AM
    This is my response


    >>Curtis 12/15/2023 11:23 AM
    This is a test of the comments submitted with approve button function.

  • EddieE Profile Picture
    4,641 Moderator on at

    @Phineas 

    Ok, not what I'm looking for. I'm looking to see what the HTML code looks like that wraps around your RequestComment field.

     

    If you have/know the ID number of the above record, add a label inside your app and add this as the Text property (change references to suit)

     

    LookUp( yourTableName, ID = yourIDNumber, RequestComments)
  • Phineas Profile Picture
    5,331 Moderator on at

    Not trying to challenge you, Obi Wan, but the '=' didn't work. It required and 'in'.🤓

    Here ya go...

    Phineas_0-1702956451714.png

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 294 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 169

Last 30 days Overall leaderboard