
Announcements
I have developed an app that creates appointments during any given day. Requirements are that there cannot be more than four persons in ten minute time slot increments. I created a TimeSlot collection seen here. This is a gallery showing this collection, but now what I need to do is filter the gallery items based on the date selected (stored in a variable called _currentDate) and where the count of each item in TimeSlot is less than 4. I can easily do the RowCount, but how do I iterate through each time slot to get that RowCount? My guess is I need to create a temporary table and use that as the Gallery item? Thanks for the information
UPDATE: I pretty much solved this going another route (but I still would like to know if the ForAll is feasible for my own understanding). In the datacard, I set another text label to do a count on each ThisItem.Value and the set this formula in the Visible property: If(Value(lblCurrentScheduledCount.Text)<4,true,false)
Hi @Anonymous
If your data source has the information saved (# of items), you don't need to loop through all of them. A simple Filter would be sufficient.
If your data source does not contain the desired data, you would probably best going with a ForAll() and AddColumns(). Meaning, while looping through each of your time slots, you could add an additional (temporary) column. For example the # of items for that time slot.
Once you have that, you can then filter on that.
I hope this helps.
Kind regards,