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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Unable to extract appe...
Power Automate
Unanswered

Unable to extract appended Comments from Multi-Text field using a Flow

(0) ShareShare
ReportReport
Posted on by 30

Hoping someone can assist – I’m trying to setup an instant flow that runs off a button in PowerApps that gets appended comments from a multi-line text field in SharePoint called “Comment”

Display Appended Comments Version History From SharePoint List On PowerApps (c-sharpcorner.com)

 

I found this article and I can re-create the exact flow they show, but I get the following error at the Apply to Each part:

drewdev_0-1664817126845.png

I have confirmed ID 49 has multiple comments so I can’t figure out why it keeps coming back as Null.

 

Parse JSON: 

{
    "type""object",
    "properties": {
        "value": {
            "type""array",
            "items": {
                "type""object",
                "properties": {
                    "Comment": {
                        "type""string"
                    }
                },
                "required": [
                    "Comment"
                ]
            }
        }
    }
}


Any help figuring this out would be much appreciated as I need to implement this type of solution in many different forms we have in the environment.

I have screenshots of the Flow and the JSON Outputs, but I'm not exactly sure how to attach them so they can be viewed.

 

Thanks so much!

Categories:
I have the same question (0)
  • Verified answer
    v-yujincui-msft Profile Picture
    on at

    Hi @drewdev ,

     

    To be honest, I didn't follow the link you provided exactly, I made a simplified version for your reference.

    1. Here is my List.

    vyujincuimsft_0-1664950306847.png

    2. Here is my Flow.

    body('Send_an_HTTP_request_to_SharePoint')?['value']
    concat('<div><font color=green>',items('Apply_to_each')['Author']['LookupValue'],' (',convertFromUtc(items('Apply_to_each')['Modified'], 'China Standard Time', 'MM/dd/yyyy hh:mm tt'),'):<div>',items('Apply_to_each')['Comment'],'</div></div>')

    vyujincuimsft_1-1664950342031.png

    vyujincuimsft_5-1664952399237.png

    vyujincuimsft_3-1664950721232.png

    3. Here is my App.

    Set(AppendCommentsMore,GetAllversions.Run("1").result)

    vyujincuimsft_6-1664952502737.png

    Here is a link for your reference.

    Default Time Zones | Microsoft Learn

     

     

    Best Regards,

    Charlie Choi

  • Andrew5715 Profile Picture
    30 on at

    Thank you Charlie! This works as intended - I just switched the "1" to the Gallery.Selected item and it pulled in perfectly within the app. 


    Is there an easy way to format the HTML text to separate out the sections (Comment time/ name etc) into different colors? like you have shown in your final screenshot

     

    And any way to add a line break in between each comment? Need to try and clean up the formatting so it provides a better user experience. Thanks for your help!

  • v-yujincui-msft Profile Picture
    on at

    Hi @drewdev ,

     

    Maybe you could try the following expressions.

    concat('<div><font color=green>',items('Apply_to_each')['Author']['LookupValue'],' <font color=blue>(',convertFromUtc(items('Apply_to_each')['Modified'], 'China Standard Time', 'MM/dd/yyyy hh:mm tt'),'):<div>',items('Apply_to_each')['Comment'],'</div></div><br />')

    vyujincuimsft_0-1665020919348.png

     

     

    Best Regards,

    Charlie Choi

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard