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 / Populate Drop Down Men...
Power Apps
Answered

Populate Drop Down Menu based on query

(0) ShareShare
ReportReport
Posted on by 6

I´m working in an App to register users interest in some courses. This app store data in a List with the fields NAME and COURSE.

We have actually just five courses, so, the user select it in a DropDownMenu (Course 1, Course 2 etc).

I want that if the course has 40 subscrites, it not appears in the dropdown menu.

Does anyone have some suggestion?

Categories:
  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    @vicariduarte ,

    What are the Items of the drop-down?

  • vicariduarte Profile Picture
    6 on at

    The Courses (Course 1, Course 2, Course 3 etc).
    But, if that course has more than 40 subscribers, it not appear in the drop-down.

  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    @vicariduarte ,

    What is the actual (exact) Items code? There is no 40 item limit, so I am not sure where that is coming from.

  • vicariduarte Profile Picture
    6 on at

    The 40 limit is not a MS List limit. Its a business rule. I can´t accept new subscribers if that course if full (40 students).

    So, for example, I have 5 courses (1, 2, 3, 4 and 5). It will appear in the combobox just the courses that has not 40 subscribers yet.

  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    @vicariduarte ,

    So I am clear, you want to exclude the course from the drop-down if there are 40 subscribers? It would be easy to give a warning (and not allow selection) , but dynamically removing it would be quite complex.

  • vicariduarte Profile Picture
    6 on at

    Yes, exactly. Can be a simples warning or not allow selection. How can I do it? My difficult is in obtain from the List a somatory of all subscribers for each course.

    Actually I´m using a GroupBy Function, that give me the sum of subscribers, then i make a new Collection just with the register with less than 40. So i take this collection and fill the drop-down. But again, this is not so efficient, I´m sure that there is a better solution.

  • Verified answer
    WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    Hi @vicariduarte ,

    On the OnChange of the drop-down, something like this

    If(
     CountRows(
     Filter(
     YourListName,
     YourCourseFieldName = Self.Selected.Value
     )
     )>40,
     Notify("This course is full - you cannot select it",Error);
     Reset(Self)
    )
    

    I assume you have a Choices field for the courses, otherwise .Value may be different.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard