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 / Gallery fields reset u...
Power Apps
Answered

Gallery fields reset upon first navigation away

(0) ShareShare
ReportReport
Posted on by 6

I have a PowerApps which has three screens with Gallery

This Gallery is successfully pulling data from a SharePoint List

 

Against each item in Gallery, I have a toggle control where user can select On / Off - which Off being the default.

 

When user update on screen 1 all toggles and navigate away, they can momentarily see all toggle reset to Off and then screen 2 is displayed.

Now when user go back to screen 1, they see all toggle were indeed reset. User updates the toggle control values and navigate away and this time there is no reset happening.

 

Is it possible to understand the reason for this behavior? I would want  that toggle selection should persist when user move from screen 1 to 2 - irrespective of whether this is first navigation or second navigation.

 

I have not touched the default property of Gallery

I have not touched the default or reset property of toggle

my navigation button OnSelect property set some global variables based on number of toggle selected, but it doesn't talk about reset behavior

 

Thanks for help.

Categories:
I have the same question (0)
  • happyuce55 Profile Picture
    6 on at

    Edit to Add:

    Same behavior happens when user goes from screen 2 to 3... so it is not related to Gallery on screen 1 but Gallery in general. Also same behavior happens if I replace Toggle with a Rating Count. All stars in Rating disappear when I do first navigation away from the screen

  • rimatos Profile Picture
    on at

    Hi @happyuce55 ,

     

    Does this issue occur in edit mode or when running the published app?

    I tried replicating thin on my end by creating a blank app, with a new gallery pointing to SharePoint list, and inserted in the gallery a toggle button.

    image.png

    Upon navigating screen however I was not able to reproduce the behavior you mentioned.

     

    Have you tried creating a new app with a simple gallery with these toggle buttons and 2 screens to navigate around, so you can check if the behavior is also reproducible there?

     

    If its not reproducible it could indicate that there is something in your logic that is performing a reset the buttons for some reason.

     

     

    Hope this helps!

     

    Regards,

    Ricardo

  • happyuce55 Profile Picture
    6 on at

    Error does not happen in edit mode but in published mode.

     

    I used monitor to see what was happenning and in edit mode - the data for gallery was pulled (getRows) before I navigate from opening / title screen to 1st screen with a gallery.

     

    In published mode - the data for gallery is pulled (getRows) only when the screen with gallery becomes visible.

     

    When I am loading data for gallery, I am applying some filter on certain columns for which values are chosen in opening / title screen.

     

    I tried blank app and could not see error in edit screen but did see in published version.

     

    Now what I am doing is creating a local collection before I go from opening/title screen to 1st screen with gallery. This local collection has filters applied and therefore gallery now point to collection in its entirety and now my toggles or rating buttons don't reset on 1st navigation away... 

  • Verified answer
    rimatos Profile Picture
    on at

    Hi @happyuce55 ,

     

    Glad to hear you managed to get a working solution on your end!

    The fact that this only occurs in published mode, may be related with some of the Preview features that could be present in the Powerapp settings in terms of loading of the app.

    image.png

    As seen in the picture above, there are settings that only load your rules in a on-demand request, which could explain why the data is only loaded when the screen is visible.

     

    You could attempt to remove this feature in order to fix this behavior. However, do take into account that this will influence the performance of your PowerApp.

     

    Hope this helps!

     

    Regards,

    ricardo

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard