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.

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:

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 