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 / Retain selected values...
Power Apps
Answered

Retain selected values in a dropdown

(0) ShareShare
ReportReport
Posted on by 321

Afternoon,

 

I have two dropdowns on my screen, which filter a gallery on screen, by status and workplan.

 

Within the gallery I have links to other screens. 

 

I would like to retain the users selections in the dropdown boxes when the user navigates off the screen then back.

 

Is there a way to achieve this?

 

Thank you

Categories:
I have the same question (0)
  • C-Papa Profile Picture
    1,836 on at

    yes, with the OnChange property of the dropdown add Set(var_Selected, Self.Selected),

    the change the default to var_Selected.

     

    for dropdown2 use Set(var_Selected2, Self.Selected), Default = var_Selected2

     

     

  • JimboSey Profile Picture
    321 on at

    Hi, thanks for your reply.

     

    When I out var_selected in the Default it says there is an error in the formula with the Data Type: Record.

  • C-Papa Profile Picture
    1,836 on at

    can you post your dropdown items code? Also, are you allowing multi select?

  • JimboSey Profile Picture
    321 on at

    I am not allowing multiple sections.

     

    In my items for the dropdown my code is collectProductTitle

     

     

    The onvisible code for the screen itself is

     

    ClearCollect(collectProductTitle, {Value: "All"});

    Collect(collectProductTitle, Choices([@JSConsolidationProductTitle].HLStatus));

    ClearCollect(collectWorkPlanChoice, {Value: "All"});

    Collect(collectWorkPlanChoice, Choices([@JSConsolidationProductTitle].PT_WorkPlanChoice))

     

     

     

    Thanks

  • avootla1 Profile Picture
    31 on at

    @JimboSey 

    The error is because you are setting a record/row of the collectProductTitle collection.

     

    Simply add .Value at the end of the formula. You will see it working.

  • JimboSey Profile Picture
    321 on at

    Do you mean like this...

     

    (var_Selected, Self.Selected.Value)

     

    If so I added this and the error message went but still reverts back to "All" when I navigate away and back. 

     

    I need it to retain the dropdown value I selected.

  • Verified answer
    v-JessicaG-msft Profile Picture
    Microsoft Employee on at

    Hi @JimboSey ,

     

    You could add the " Reset("Dropdownname") " formula to the screen's onvisible property.

    vJessicaGmsft_0-1643103413996.png

     

    Best Regards,

    Jessica Gu

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard