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 / Register downtime resu...
Power Apps
Answered

Register downtime result in sharepoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I am in the process of developing downtime registry in sharepoint list.

 

at the moment i am using this formula for patch

1.JPG

If(
 IsBlank(LookUp(Downtime, Operator.Value = Operator_dropdown_1.SelectedText.Value && Machine.Value = Machine_dropdown_1.SelectedText.Value && Reason.Value= Reason_dropdown_1.SelectedText.Value )), 
 Patch( 
 Downtime,
 Defaults(Downtime),
 {
 Operator: Operator_dropdown_1.SelectedText,
 Start: Now(),
 Machine: Machine_dropdown_1.SelectedText,
 Reason: Reason_dropdown_1.SelectedText
 }
 ),
 Patch(
 Downtime,
 LookUp(Downtime, Operator.Value = Operator_dropdown_1.SelectedText.Value && Machine.Value = Machine_dropdown_1.SelectedText.Value && Reason.Value= Reason_dropdown_1.SelectedText.Value),
 {
 Finish: Now()
 }
 )
)

the value get stored in sharepoint list

2.JPG

 

the app intention is to work in this way. when the operator experience a downtime, they will register the start of downtime by choosing their name,machine,downtime reason and patch button, it will make a registry in sharepoint list, and when the downtime finish, operator will once again press the patch and it will lookup by operator name, machine & start time value and then register the finish time on that particular registry.

like below 

3.JPG4.JPG5.JPG

 

the problem i face now is i cant make the registry if the downtime is repeating multiple times per day by same operator & machine. example if operator have 3 breakes per day, app can only register the ist downtime registry for the operator & machine choosen. it is not registering the for the second time.

 

when i do that it simply updating the finish time & not creating new registry.

6.JPG7.JPG

 

Please let me know how to solve this issue.

8.JPG

Please can you recommend me wwhat kind of changes in the formula i need to use inorder to get such result from the app.

 

i was thinking, if operator & machine & downtime reason remains constant the only variable can be the ID number, is there someway to create a new registry by including ID number as a serach option in Lookup for patching value in sharepoint?

 

any help is highly appreciated.

 

Thanks.

 

 

 

 

 

Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I believe here is a easy way that check if both Start and Finish field have value. If both are filled, then create a new registry. Please try this:

    Set(varItem, LookUp(Downtime, Operator.Value = Operator_dropdown_1.SelectedText.Value && Machine.Value = Machine_dropdown_1.SelectedText.Value && Reason.Value= Reason_dropdown_1.SelectedText.Value ));
    If(
     IsBlank(varItem)||(!IsBlank(varItem.Start)&&!IsBlank(varItem.Finish)), 
     Patch( 
     Downtime,
     Defaults(Downtime),
     {
     Operator: Operator_dropdown_1.SelectedText,
     Start: Now(),
     Machine: Machine_dropdown_1.SelectedText,
     Reason: Reason_dropdown_1.SelectedText
     }
     ),
     Patch(
     Downtime,
     varItem,
     {
     Finish: Now()
     }
     )
    )

     Hope this helps.
    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-siky-msft ,

     

    Thanks for your help. 

     

    I used the formula described, for the 2nd entry of same downtime by same operator & same machine, it is creating a new registry for start, but unfortunately when i try to end the registry of downtime registry to finish, it keeps on making a new registry with start time, but now looking up and updating the finish time for the 2nd entry.

     

    Capture.JPG

     

    any help is highly appreciated, what changes should i need to make to solve this issue?

     

    Thanks in advance. 

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

    Hi @Anonymous ,

     

    Another solution is filter out all completed registry first. Please try this:

    Set(varItem, LookUp(Filter(Downtime,Start=Blank() || Finish=Blank()), Operator.Value = Operator_dropdown_1.SelectedText.Value && Machine.Value = Machine_dropdown_1.SelectedText.Value && Reason.Value= Reason_dropdown_1.SelectedText.Value ));
    If(
     IsBlank(varItem), 
     Patch( 
     Downtime,
     Defaults(Downtime),
     {
     Operator: Operator_dropdown_1.SelectedText,
     Start: Now(),
     Machine: Machine_dropdown_1.SelectedText,
     Reason: Reason_dropdown_1.SelectedText
     }
     ),
     Patch(
     Downtime,
     varItem,
     {
     Finish: Now()
     }
     )
    )

     

    Hope this helps.

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard