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

Notifications

Announcements

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

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:
I have the same question (0)
  • FabianAckeret Profile Picture
    969 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard