web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / ForAll or something else?
Power Apps
Unanswered

ForAll or something else?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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)

 

guyinazo_0-1609157232447.png

 

Categories:
  • FabianAckeret Profile Picture
    975 on at

    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,

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard