HI,
I have StartDate and EndDate as input fields. I wanted to list the dates from the start date to end date.
e.g StartDate = #2021-8-1# and EndDate = #2021-8-5# then it show list as
2021-8-1
2021-8-2
2021-8-3
2021-8-4
2021-8-5
Hello there R J,
I did a small page with the implementation that you need.
You can check it here: https://rbarradas.outsystemscloud.com/ListOfDates/Screen1
Please refer to attached OML file with this logic.
Hope that this helps you!
Kind regards,
Rui Barradas
Ok,
so this sounds like an exercise you are trying as a beginner. So let´ s not give full solution. Just some elements :
you probably have 2 local variables those inputs are bound to
You might have a local variable being a list of date to put your result in
Investigate what an ad hoc loop is : you´ ll need a 3rd date that loops from startdate to enddate
Investigate listclear and listappend
Investigate built in function AddDays
Bind a tablerecords or list widget to your result list variable
Those are the elements you´ ll need.
Dorine
Hi @Dorine Boudry,
Thanks for the update if you provide oml then it will be helpfull.
thanks
Well,
Let´ s say you provide an oml with how you are trying it and what part you are struggling with.
Thanks for the pointers, Dorine!
Hey RJ
Create a local list with a structure having a Date attribute, Have all the attributes required for input.
In the client action on change of end date append have a loop from start to end date and append all the dates to the local list.
Refresh the list screen and you should have a list with all the input fields. Keep Date as an expression.
Make sure you do not allow a big date difference as you then might require pagination with data saving on page change.
Hope this helps
Regards
Vaibhav Shukla