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 / Gallery Filter Dropdowns
Power Apps
Unanswered

Gallery Filter Dropdowns

(0) ShareShare
ReportReport
Posted on by 1,265

I have the filterPane shown at the end in a Power App gallery.  When I...

1.  Select a specific Supervisor (from the filterPane shown)

2.  Select a specific employee from the filtered data (opens a form in edit mode)

3.  Edit that employees data

4.  Navigate back to the Gallery

the Supervisor dropdown returns to the "---" value (which is the default).  Is it possible for the navigation to return to previously selected Supervisor choice (rather than the default)?   

 

RJF61_0-1682452329881.png

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,640 Most Valuable Professional on at

    Hi @RJF61 ,

    You would need to set a Variable OnChange of the Combo Box and then test for this Variable having content in your DefaultSelectedItems. You have not posted any code - assuming your Items of the Combo Box are not based on a Person field (this would get very messy), if for instance the Combo Box output is .Value - OnChange

    UpdateContext({varSuper: Self.Selected.Value})

    DefaultSelectedItems

    {Value: Coalesce(varSuper, ThisItem.YourFieldName)}

    Depending on the field type being read, you may need .Value at the end of the field name.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • RJF61 Profile Picture
    1,265 on at

    Hello @WarrenBelz Following is the Code for the Supervisor Dropdown...

    Sort(
    Filter(
    EmployeeShort,
    (
    CurrentEE = true
    ) &&
    (
    'Job Title' = "---" || 'Job Title' = "Maintenance, Manager" || 'Job Title' = "Maintenance, Senior Manager"
    )
    ),
    FullName,
    SortOrder.Ascending
    )

  • RJF61 Profile Picture
    1,265 on at

    Hi @WarrenBelz I have used the following on the Default for the Dropdown...

     

    {Value: Coalesce(varSuper: ThisItem.Dropdown2)}

     

    I have changed Dropdown2 to the Items column which is FullName and added/removed .Value.  I have also added/removed .Value following Dropdown2.  Regardless, I am continuing to receive an error on the colon following varSuper.

    Unexpected characters.  The formula contains 'Colon' where 'ParenClose' is expected.

    Unexpected characters.  The formula contains 'Colon' where 'CurlyClose' is expected.

    Unexpected characters.  Characters are used in the formula in an unexpected way.

     

    Syntax issue?

  • WarrenBelz Profile Picture
    155,640 Most Valuable Professional on at

    @RJF61 ,

    The formula was missing a closing bracket (now fixed - I thought you might have spotted that) - I see you have a Person field (not good items to mess with the standard settings), but assuming your field name is Supervisor, the DefaultSelectedItems

    {FullName: Coalesce(varSuper, ThisItem.Supervisor.FullName)}

    I am also assuming here varSuper is a String Value.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • RJF61 Profile Picture
    1,265 on at

    Hi @WarrenBelz the SP column name is Supervisor and it is a text string.  FullName is the column name of the employee and Supervisor is the employees supervisor.  The Supervisor Dropdown is named Dropdown2.  Values for the Dropdown are collected via...

     

    Sort(
    Filter(
    EmployeeShort,
    (
    CurrentEE = true
    ) &&
    (
    'Job Title' = "---" || 'Job Title' = "Maintenance, Manager" || 'Job Title' = "Maintenance, Senior Manager"
    )
    ),
    FullName,
    SortOrder.Ascending
    )

     

    Does that change the Default - {FullName: Coalesce(varSuper, ThisItem.Supervisor.FullName)}.  Also, the Dropdown field option identifies Default and not DefaultSelectedItems.

  • WarrenBelz Profile Picture
    155,640 Most Valuable Professional on at

    Hi @RJF61 ,

    One thing I cannot completely visualise here - your Dropdown Items (condensed version below)

    Sort(
     Filter(
     EmployeeShort,
     CurrentEE &&
     (
     'Job Title' = "---" || 
     'Job Title' = "Maintenance, Manager" || 
     'Job Title' = "Maintenance, Senior Manager"
     )
     ),
     FullName,
     SortOrder.Ascending
    )

    is looking for employees where they have no 'Job Title' or they are a Manager or some sorts. I assume here you are displaying the FullName field (I release now it is not a person field - brain wires crossed with User() while typing). So I have to assume here you also have a Text field called Supervisor where you are selecting a person from the same list and writing to this field from the drop-down except you also have a string value of varSuper you want to prioritise if it contains a value. If all of this is true, then the Default of your Dropdown would be  

    Coalesce(
     varSuper,
     ThisItem.Supervisor
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • RJF61 Profile Picture
    1,265 on at

    Hi @WarrenBelz ,

    Yes, you are correct that the Dropdown is displaying values from field Supervisor' in SP List EmployeeShort'  where their Job Title is "---", "Maintenance, Manager" or "Maintenance, Senior Manager".  The names entered in the 'Supervisor' field are text and not from a list (method could generate errors, etc.).

     

    My original post question was when I...

    1.  Select a specific Supervisor (from the filterPane 'Supervisor' dropdown shown) - i.e., Smith, John

    this lists employees reporting to Smith, John

    2.  Select a specific employee from the filtered data (opens a form in edit mode)

    edit that employees data and save

    3.  Select the 'Return' button on the edit form and Navigate back to the Gallery

     

    After navigating back to the gallery, the Supervisor dropdown returns to the "---" value (which is the default).  Is it possible for the navigation to return to the previously selected Supervisor choice from Step 1 (rather than the default)?

     

    Does this make the scenario clearer?

  • WarrenBelz Profile Picture
    155,640 Most Valuable Professional on at

    @RJF61 ,

    The main point of my last post was the Default of the drop-down (which addresses your question)

    Coalesce(
     varSuper,
     ThisItem.Supervisor
    )

    Is this not what you need to retain the value in the Supervisor drop-down ?

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 426

#2
WarrenBelz Profile Picture

WarrenBelz 381 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard