Skip to main content
Community site session details

Community site session details

Session Id : uWwNRnIvTsjwLHmIstFnnq
Power Apps - Building Power Apps
Unanswered

SharePoint history in PowerApps

Like (0) ShareShare
ReportReport
Posted on 5 Feb 2020 13:09:32 by 65

Hi,

I don't know where exactly ask this question, but since I'm bulding app in PowerApps...

 

I've followed this tutorial https://www.about365.nl/2019/08/08/view-sharepoint-item-version-history-in-powerapps/ and I don't know where to find other history version properties. The ones I'm looking for is "previous value" and "new value" since, I want to show in app who change it, what was changed and what was changed to.

 

Cheers 🙂 

//edit

I've looked up to results from API and there are for every version all values that were saved. So the question is how to grab those values - for previous version, compare it and show only those fields that were changed.

//edit2

Mhm maybe filtering https://github.com/Microsoft/api-guidelines/blob/master/Guidelines.md#97-filtering gonna help?

Categories:
  • nottheOther Profile Picture
    65 on 07 Feb 2020 at 08:19:19
    Re: SharePoint history in PowerApps

    Hi @v-xida-msft 

    Thanks for the reply.

    Basically I want to implement "Version History" from SharePoint list in nearly same form. [test.PNG] I just need to represent what changes has been made. 

     

    And I want all history, just like in SharePoint, ex.

    No 3.0 etc.

    No 2.0

    column1 "fail"

     

    I've made change in column1 from "ok" to "fail", and in No. 2 verisoning only "column1 "fail"" that record will be shown.

    No 1.0

    column1 "ok"

    column2 "fail"

     

    //edit I hope it's understandable 🙂

  • v-xida-msft Profile Picture
    on 06 Feb 2020 at 07:44:34
    Re: SharePoint history in PowerApps

    Hi @nottheOther ,

    Could you please share a bit more about your scenario?

    Do you want to retrieve the record value of a specific item for previous version?

     

    Based on the needs that you mentioned, I agree with your thought almost. I think the combination of PowerApps and Power Automate could achieve your needs.

     

    If you want to retrieve the record value of a specific item for previous version, I think the $top=2 filter operator within the HTTP URL action path could achieve your needs.

    Please check and see if the following blog would help in your scenario:

    http://johnliu.net/blog/2018/5/microsoft-flow-sharepoint-trigger-on-specific-fields-changed-via-sp-http-request

     

    Within your Power Automate flow, add a "Send an HTTP request to SharePoint" action, Uri field set to following:

    _api/web/lists/getbytitle('ListName')/items(triggerBody()?['ID'])/versions?$top=2

    then the "Send an HTTP request to SharePoint" action would retrieve the current version of this List Item and the previous version of this List Item. In the last step, remove the"Respond to PowerApps or Flow" action, instead, add a "Response" action to return retrieved table value back to your app.

    On your side, you could pass the retrieved version table back to your app.

    Please take a try to achieve your needs based on the following blogs:

    https://powerapps.microsoft.com/en-us/blog/return-an-array-from-flow-to-powerapps-response-method/

    https://www.about365.nl/2019/08/08/view-sharepoint-item-version-history-in-powerapps/

    http://johnliu.net/blog/2018/5/microsoft-flow-sharepoint-trigger-on-specific-fields-changed-via-sp-http-request

     

    In addition, if you want to only show those fields that were changed within your app, please consider take a try with the following workaround:

    Within your app, save the returned result from your flow into a collection (including two records):

    ClearColelct(
     ReturnedResult,
     Versionhistorydemo.Run(ThisItem.ID)
    )

    then add a Data Table in your app, set the Items property to following:

    ReturnedResult

    enable related fields within this Data Table, select the column in this Data Table, set the Visible property to following:

    for column1:

    If(
     First(ReturnedResult).Column1 = Last(ReturnedResult).Column1,
     false,
     true
    )

    for column2:

    If(
     First(ReturnedResult).Column2 = Last(ReturnedResult).Column2,
     false,
     true
    )

    for column3:

    If(
     First(ReturnedResult).Column3 = Last(ReturnedResult).Column3,
     false,
     true
    )

    ...

    ...

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete