@Digital
No collection is needed for this for a text box. Plus, your ForAll is backward. You are using it like a ForLoop in some development language.
If you for some reason wanted this in an in-memory database in the app, then your formula would be written as:
ClearCollect(colInbetweenDates,
ForAll(
Sequence(DateDiff(DatePicker1.SelectedDate,DatePicker2.SelectedDate, Days), 0),
{
date: DateAdd(DatePicker1.SelectedDate, Value)
}
)
)
Of course, this would have to then be done in a behavioral property ONLY. So it would have to be initiated.
ForAll is a function that returns a table. It will do this despite how you use it. So in your case, it is still generating a table with a duplicate of all the collection returned from the Collect function in each row of the sequence. All of this is then put together as a table with (in your formula) a record with a single column called Value that will have the entire collection duplicated in the column for each row.
In this example, it is not extreme, but using a ForAll like that will, in larger examples, consume a lot of memory and resources to generate...and then you completely discard it when done in your formula. So the process is wasted - but still performance is consumed.