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 / Setting a dropdown def...
Power Apps
Answered

Setting a dropdown default value that filters a gallery

(0) ShareShare
ReportReport
Posted on by 333

Hi - I have a gallery that currently has two dropdowns for filtering.

1.Approval Status

2. Job Status

 

Both of these are based on collections using data from their own separate SP lists.

 

I have everything working, with exception of getting the ApprovalStatus dropdown, to always have "Approved" as the selection.

The idea being that workers don't need to see tasks that haven't been approved for scheduling (basically requests that have been rejected in the first stage of the request process).

 

I have tried changing the 'Default' value for the dropdown to "Approved", but it resets to "All" each time I leave the screen and come back. I have tried an onVisible so that the dropdown selects "Approved", but this doesn't work also.

 

The selection options in the Approval Status list are:

-

Approved

Rejected

Deferred

 

I use a ClearCollect to bring the 'All' option in.

 

If working correctly, when staff look at current tasks, they will see all tasks that have been approved. They can then filter this list based on job status. 

 

Thanks

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @BrendanZ1 

    Could you please post the Items property of your gallery?

  • BrendanZ1 Profile Picture
    333 on at

    Yep @Drrickryp  no worries;

     

    If(ddApprovalStatus.Selected.AprrovalStatus = "All" And JobStatusDropDown.Selected.JobStatus = "All", WorkOrderList,
    JobStatusDropDown.Selected.JobStatus ="All" And ddApprovalStatus.Selected.AprrovalStatus <> "All",
    Filter(WorkOrderList, ApprovalStatus = ddApprovalStatus.Selected.AprrovalStatus),
    JobStatusDropDown.Selected.JobStatus <> "All" And ddApprovalStatus.Selected.AprrovalStatus <> "All",
    Filter(WorkOrderList, ApprovalStatus = ddApprovalStatus.Selected.AprrovalStatus And JobStatus = JobStatusDropDown.Selected.JobStatus)
    )

     

    While this is enabling choice for the ApprovalStatus dropdown, I want it set to approved only. If there is another way to do this without using a dropdown, I am open to that suggestion too.

  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    What is the Items property of the dropdown for approval status?

    One simple resolution is to populate your collection with "Approved" as the first value. If that's not ideal, try this as the default value:

    Assuming approvalStatusColl is the collection name:
    LookUp(approvalStatusColl, Value = "Approved")

    Another option is to use a combo box but we will get to that only if needed.

    Let me know if this helps.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • BrendanZ1 Profile Picture
    333 on at

    Thanks @PowerAddict  while it isn't ideal, I have changed the collection to grab "Approved" first. It isn't a big deal though as the dropdown will be hidden anyway.

     

    Incidentally, the LookUp option didn't seem to want to work.

     

    Thanks again

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Awesome! Glad I could help! Good luck with the rest of your app! Feel free to reach out in case of any questions!

    Side note: Can you please share the error you were getting with the LookUp function?

    Thanks,
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com

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
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard