cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bartek1
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

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

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. 

 

 

@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!!

Hi @Bartek1 ,

 

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

@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)

 

 

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.

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?

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

@MH3 sure, thank you very much! 😉

 

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,740)