Hi Allen,
How can I manage if I have a start date (date picker) and must be added to this.
For example my first date is 12/07/2021. After this, the following dates should be generated automatically.
07-12-2021
08-12-2021
21-12-2021
22-12-2021
04-01-2022
05-01-2022
So first + 1 day then +14, days. then again + 1 day and again 14, etc. and that in a set of 16x (see picture)
I have the following Collection
ClearCollect(
DateRanges,
AddColumns(
firstN(
[0,1,14,15,28,29,42,43,56,57,70,71,84,85,98,99],
DateDiff(DatePicker1_1.SelectedDate, DatePicker2_1.SelectedDate, Days) + 1
),
"day",
"Day" & (Value + 1),
"date",
DateAdd(DatePicker1_1.SelectedDate, Value, Days)
)
)
My question is how can I write the dates in a SQL database.
Database is called cycle
Date column fields are, date1, date2, date3 to date16
Hope you can help me.
Hi @rvdhorst,
You're going about it the right way for your purpose.
In the button OnSelect I would also add a Notify("Dates added") so the user knows it has worked. Without a confirmation they might press the button multiple times and add multiple sets of records.
Finally, you might want to wrap your Patch() in an IfError() so you can control what happens if the patch doesn't work properly.
Good luck with your project!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
188 | |
54 | |
42 | |
36 | |
33 |
User | Count |
---|---|
258 | |
78 | |
74 | |
71 | |
68 |