cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Powerapp does not update sharepoint list after app closing

Hello,

 

I have created an app that have two screens: 

- first that shows picture, name and phone number (using Office365user add-in)

- second with possibility of check in and check out

 

The app is connected to a sharepoint list and everything works correctly if i have the app opened and i click check in, my profile appears on the first screen, if i click check out, my profile dissapear but when I click check in and then close the app and open it again, the check out button does not work and does not update the data, so even though I click it, the data is still visible and sharepoint list does not update.

 

I used the following code in the check out button:

OnSelect: Refresh('Sharepoint List');; If(!IsBlank(CurrentCheckedInRecord); Patch('Sharepoint List';CurrentCheckedInRecord;{CheckOut:Now()}));; Navigate(MainScreen;ScreenTransition.Fade)

DisplayMode: If(
    !IsBlank(LookUp('Sharepoint List'; StaffEmail=varUserEmail And CheckOut=Blank()));
    DisplayMode.Edit;
    DisplayMode.Disabled)

 

Could you please support why the checkout button does not update my sharepoint list after the app is closed?

 

Many thanks in advance!!

19 REPLIES 19
Highlighted

@VDS_Mantra  could you please support how this Ticket Id could be set?

Highlighted

Hi, 

 

Use can use the MH3 Suggestion, this logic will also resolve your problem if there is single entry of a user in a day. 

 

 

Highlighted

@MH3in your solution now it shows that both buttons are disabled and i cannot use them. In addition with the check out button I have information, that the part of this formula may not work with the bigger data sets. Operation "CountRows" is not supported by this connector.

 

I have created Status column and changed everything as you said. There is no function error.

 

@VDS_Mantraso this solution supports only one entry a day? What if the employee will leave and want to check in after an hour? 

 

Many thanks for support!!

Highlighted

Hi @Bartek1 ,

 

Show me your Sharepoint ScreenShot, and show the code what you have entered in both Display and OnSelect.

Highlighted

@MH3attached i added my sharepoint list, the list is called "Sharepoint List".

 

Below codes:

Check in on select:

Patch('Sharepoint List'; Defaults('Sharepoint List');{Title:"Employee";StaffFullName:User().FullName;StaffEmail:User().Email;CheckIn:Now();Status:"IN"});; Navigate(MainScreen;ScreenTransition.Fade)

 

DisplayMode: If(IsBlank(LookUp('Sharepoint List'; StaffEmail=varUserEmail And Status="IN"));
    DisplayMode.Disabled;
    DisplayMode.Edit)

 

Checkout on select:

Refresh('Sharepoint List');; If(CountRows(Filter('Sharepoint List';StaffEmail=varUserEmail;Status="IN"))>0; Patch('Sharepoint List';First(Filter('Sharepoint List';StaffEmail=varUserEmail;Status="IN"));{CheckOut:Now();Status:"OUT"}));; Navigate(MainScreen;ScreenTransition.Fade)

 

DisplayMode:

If(
    !IsBlank(LookUp('Sharepoint List'; StaffEmail=varUserEmail And Status="IN"));
    DisplayMode.Edit;
    DisplayMode.Disabled)

 

 

Highlighted

Hi @Bartek1 ,

So, both the buttons are Disabled? 
can you Remove the Quotations from Sharepoint list name? in Display Mode Code.

 

Check again if only the Check in Button is enabled.

Highlighted

Hi @MH3,

 

Thank you for the answer. I have added ! before isblank in the check in button and now it all works. But still there is a yellow triangle next to check out buttons that shows the following info: the part of this formula may not work with the bigger data sets. Operation "CountRows" is not supported by this connector.

 

Is there any way to correct it?

Highlighted

Hi @Bartek1 ,

 

Glad to hear that it worked for you!!!

 

Don't worry it's just the delegation warning not an error you will still use the application good.

 

and do me favor can you please mark my reply as a Solution. So, that everyone could find it.

 

if you need any help feel free to contact 🙂

Thanks

View solution in original post

Highlighted

@MH3 sure, thank you very much! 😉

 

Highlighted

Hi @Bartek1 ,

 

Thanks, Just Remember me in your Prayers.

 

Actually, I am stuck in saving the location of the user while he checks i, if that works, than you can in-corporate that feature into your app as well.

if you have any idea, how to achieve that do share it with me.

 

 

Thanks

-MH3

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,362)