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 / App for vacation manag...
Power Apps
Unanswered

App for vacation management

(0) ShareShare
ReportReport
Posted on by 21

Hi Guys,

 

I'm just about to create a first version for a vacation management. And i'm very new to PowerApps.

 

Note: the UI will be updated later and is currently in the alpha phase

 

The App accesses various SharePoint lists, such as Employees (name, max days, Remaining days), My vacation overview (start date, end date, and more for a workflow later) and public holidays in Germany (Name of the day, date and state).

 

When the app starts, the holidays and weekends are loaded into a collection.

The user has to select with two DatePickers, when the holiday starts and when it should end.

PA_02.png

The problem now is getting all the days from the DatePickers into a collection.

On the EndDate DatePicker is OnSelect or OnChange (am I not quite sure) the following code (is currently still on a button):

ClearCollect(
 geplanterUrlaub; 
 FirstN([1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30];
 DateDiff(Urlaubanfang.SelectedDate;Urlaubende.SelectedDate; Days) + 1); 
{Tage: (DateDiff(Urlaubanfang.SelectedDate; Urlaubende.SelectedDate; Days))});;SaveData(geplanterUrlaub; "geplante Urlaubstage")

On the right gallery (for my overview) is almost the same code:

AddColumns(
 FirstN(
 [1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31];
 DateDiff(Urlaubanfang.SelectedDate; Urlaubende.SelectedDate; Days) +1);
 "Tag";
 "Tag " & (Value);
 "Testdatum";
 "25.12.2017";
 "Date";
DateAdd(Urlaubanfang.SelectedDate; Value; Days) -1)

 

In the collection, the following is displayed after clicking on the button:

PA_03.png

On the basis of these two data I have not yet succeeded in carrying out calculations. 

 

My plan is to subtract all public holidays and weekends with the collection 'planned holidays/geplanteUrlaube' and 'public holidays'.

The idea is to make all calculations in the app. But how? Do I think too complicated?

The in App calculations are intended to give the user direct feedback on what happens.

 

If the employee clicks 'request vacation', the 'patch' function should be used to update the SharePoint list.

Do the calculations have to be in the 'patch' function?

Or am I doing the thing totally wrong?

 

In german it just means, I am at the end with my Latin Smiley Frustrated

 

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

    Hi @Nando,

     

     

    I got your point.

    But date calculation is not as easy as in Excel (I think the date calculation in your scenario is also not so easy with Excel) under PowerApps.

    I will make some tests and share the results.

    Adding some function reference for you:

    Day,Month,Year, Hour, Minute,Second, and Weekday functions in PowerApps

    DateAdd, DateDiff, and TimeZoneOffset functions in PowerApps

    Regards,

    Michael

  • jvanosdol Profile Picture
    2 on at

    I am brand new to powerapps and I would like to learn how to create an app like this. Any place to get like step by step help?

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard