cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anonymous21
Post Prodigy
Post Prodigy

Leave Request Template and Sharepoint

Hi, I'm using the Leave Request Template for my organization and I'm required to use Sharepoint List as the database. May I know how to actually log in as employees or managers in the template and store the data in Sharepoint List? I'm trying to store the employee's request in Sharepoint but it requires who the employee is and who is the manager to approve it to save the data. May I know how to do this?

Thank you.

@WarrenBelz @RandyHayes @Drrickryp @BCBuizer @Pstork1 @TheRobRush  @timl 

11 REPLIES 11
Pstork1
Dual Super User
Dual Super User

This Post and video will walk you through how to convert it to use SharePoint.  It will take a fair amount of work.

Leave Request Power App - SharePoint - Power Platform Community (microsoft.com)



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

Hi @Pstork1, thank you for that link but it didn't help me in using Sharepoint as a database, it skipped that part. He gave a list of steps below but when I tried to run the app, it has some errors. Do you know any other way to do it?

Thank you.

Hi @Pstork1, thank you for that link but it didn't help me in using Sharepoint as a database, it skipped that part. He gave a list of steps below but when I tried to run the app, it has some errors. Do you know any other way to do it?

Thank you.

Can you post the error you are getting?  This is an older template and it hasn't been updated so there are some errors related to changes that have been made in using OnStart. Also, the post has a video.  That is where he explains how to hook up SharePoint as the data source. There is no simple way to doit.  You have to create the list he specifies, Load it as a Data Source and then find and replace all the references to Excel that the original Template used. It takes a fair amount of work.  Basically its going through the app checker and fixing all the errors that come up when you remove the Excel Data source.

 

I normally recommend that templates be used as a learning experience instead of being treated as production ready apps.  MS keep adding and changing features to improve the product.  That inevitably breaks some of the templates. If you understand the code the fixes are relatively easy.  But if you use it as a black box that just works its a nightmare.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

@Pstork1 Whenever I run the app after I change/add a company holiday on the OnStart property, the LeaveType will be missing from the app. The LeaveBalance also become untrue and the StartDate is 20 years back on the date rather than today's date.

From the video, he just shows that those two are connected and he creates the new UI for the HR and manager for approval and pending because the connection of Sharepoint List and the Leave Request template has been done beforehand. As you said, I need to replace all the references to Excel that the original Template used, how to do that as the video does not touch on that? I can connect to Sharepoint List but I cannot store it when I click the button 'Submit Request'. May I know how to do that?

Thank you.

Did you modify the Holidays and the Balance tracking to use SharePoint lists also?  Or is it still managed in memory based off the Login screen. There are a substantial number of changes that need to be made to convert this template over to SharePoint.  There is no simple way to do it.  I did the conversion, but it took making 50-60 alterations to the code to make it work as I remember.

 

For example.  The Submit Request button doesn't actually submit the request.  It simply transfers you to the Confirmation Screen.  In the OnVisible of the Confirmation screen there is a Patch statement that actually submits the request.  That's the kind of logic you need to follow to find all the places that things are written to the Excel file and change them to SharePoint.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

@Pstork1 Can I modify the balance and holidays directly on the template and how to do it? I will try to modify the OnVisible to change it to Sharepoint. Any other places that require changes?

Hi @Pstork1, I tried to use the Patch function and I received this error. May I know how to correct it?

anonymous21_0-1650424005164.png

 

Thank you.

What kind of field did you use in SharePoint for the Leave Request Type?  Is it a Choice field?  If it is then you need to format the value as a record.

LeaveType: {Value: selectedLeaveType.Type}


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365EduCon in Chicago on Sept. 26-30 where I'll be presenting on the Power Platform!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,647)