cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kwanweiyen
New Member

changing Leave types and the balance

hello there,

 

i am trying to customise the Leave Request Power App for my company in Germany and so, there are only three different Leave types: Vacation, Sick Leave and Special Leave. 

 

i read that i should edit the OnStart property of the App and i did make some changes (i have yet to edit the description of the previous Floating Holiday):  

 

Screenshot 2021-07-22 at 14.25.10.png

but im not sure how to edit the Balance section for the "floating holiday" part:

Screenshot 2021-07-22 at 14.22.36.png

also, as seen here, i have edited the default vacation value to 25 but even after running OnStart, this is the result when i ran the app:

Screenshot 2021-07-22 at 14.22.51.png

 

another thing is, there is no upper limit when it comes to sick and special leaves in Germany, but i also realised that i cannot leave the balance as 0 and it is probably too complicated to hardcode an elegant solution for this so should i just put a very large number in? or is there a simple workaround for this?

 

would really appreciate any help, thanks!! 😀

6 REPLIES 6
KvB1
Solution Specialist
Solution Specialist

I am unfamiliar with this demo app, but it looks like it just uses static data.

 

Are there are datasources connected to this app? 

You could, for example, choose to only keep a record of how many sick days someone has taken, and not worry about keeping a balance

Pstork1
Dual Super User III
Dual Super User III

This is not as simple as just editing the OnStart property.  You need to track changes like this through the entire program.  There are multiple places where the balance is maintained.  You'll need to find them all and fix them.  This is not a simple task.  Start by reviewing the code on all the screens and be sure you understand what each section of code does.  Then you can find and change the necessary sections.



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

The data source for the original app is an Excel spreadsheet stored in OneDrive or some other location.



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

hello 🙂

 

hmm the only excel file that seems to be associated with this app is the Holidays list, which for some reason isn't very editable too (not sure what im doing wrong...) but that's for another thread.

 

the idea is to indeed keep a record of how many sick days someone has taken 🙂

hello, thank you for your reply! 

alright i will review all of the code asap (having exams now 😥

Pstork1
Dual Super User III
Dual Super User III

Let me know if you have issues with it.  I've done what you are proposing, but can't give you a list of all the places I changed. But I'll try to help you find them if you are having issues.



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

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (3,158)