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 / Best approach to build...
Power Apps
Suggested Answer

Best approach to build a screen to show how long each stage took inside our Contract list

(0) ShareShare
ReportReport
Posted on by 1,857 Season of Giving Solutions 2025
We have avSharePoint list named Contracts with a Status dropdown with these options:-
  • New
  • Open
  • In Progress
  • First Approver
  • Second Approver
  • Manager Approver
  • Finance Review
  • Closed

Now we want to build a screen which will show the time it took a contract at each stage.
Now I thought of building this as follow:-

To build a SharePoint list named “Logs”, with these fields:-
  • ID
  • ContractID
  • New
  • Open
  • In Progress
  • First Approver
  • Second Approver
  • Manager Approver
  • Finance Review
  • Closed

Now as the workflow moves, I will capture the current stage and calculate the time it took to move to next stage and so on.. then I will build a gallery inside our canvas app to show the Logs list data, with filter such as created on, contractID .

But before I start to build the above from scratch, today I though if there is a shorter approach I can follow, where I can benefit from the Contracts list version history ? to build the data I need?

Any advice?
 
Thanks
Categories:
I have the same question (0)
  • Meekou Profile Picture
    200 Moderator on at
    In my option, I would avoid to achieve by version history, because version history will loged when changes on every column, you will need to filter out the changes on Status column and then calculate the time, in short words, it can achieve, but it is complex.
     
    For logs table, you can simply your table, I think you just need ContractId, status column and modify time, there is no need to add columns for each status. and then when Status changes, just insert the rows to logs table, you will be able to easily to render it on Gallery control.
     
    Regards,
    Meekou
  • Suggested answer
    ronaldwalcott Profile Picture
    3,862 Moderator on at
    If these are the only status fields that you will have then you can have a table similar to your logs table where you are storing the times that the status changes. You will update this record when the status changes with the time for each status so you can calculate the difference in times which will indicate the time taken to change status. Or you can have as mentioned below contractID, Status and Time, then you will have to combine the records to find the time difference,
  • johnjohnPter Profile Picture
    1,857 Season of Giving Solutions 2025 on at
     
     
    Thanks a lot for the reply. But if i do not add a separate column for each status inside the Logs table, then how i can render the times in a table-like view inside the gallery? i need the gallery to show this info for multiple contracts and not just for one contract at a time , something as follow:-
     
     
    So is this possible to achieve in a delegable way if i only use one column inside the Logs table to represents the different statuses? I can not think of doing so? any advice?
    Thanks
     
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
    You would have to read the log file and create a collection with one row for each contract showing the different status times. The collection would have columns for each status which you would update from the log file.
  • johnjohnPter Profile Picture
    1,857 Season of Giving Solutions 2025 on at
     
    but using collection means i can only hold max of 2,000 items.. which might  not always be the case
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
    Only a problem if you are accessing more than two thousand contracts at a time and it would be a bit slower.
     
    Each approach has its cons.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard