It’ll take a bit to explain what I’m doing here, so I’ll start with a question in case it’s simple - is there anything I should watch for when building a screen that should navigate to another instance of itself (same logical screen with different UI based on data.) I am currently using this pattern, and it’s fine on the first screen load, but when navigating among these pages, each subsequent load gets slower and Tap events fire 3 or more times instead of just once.
Here are the details:
I have an app that is made up of several screens that are the same logical screen, but they change based on a page parameter. It’s for a scorekeeping app, and each page in the app must be filled out for a complete score to be recorded.
Each scorekeeping screen (which again is the same logical screen) consists mostly of a repeated Component that contains a row of buttons which themselves are in a Repeat. (All of this is controlled by a JSON definition file.)
Hitting the buttons works as expected when I first load a scorekeeping screen, but if I navigate among the scorekeeping screens (the same logical screen) and back to the original screen, then the buttons fire the component’s Button Tap event three times instead of just once. If I go again to another scorekeeping screen and then return again, the Button Tap event gets fired even more times.
The multiple event fires seem to be related to the fact that the user is navigating between the same logical page. If I navigate “up” out of the scorekeeping area and go back in, the event duplication doesn’t happen. It only happens when I go from one page to another within the scorekeeping function (navigating to different instances of the same logical screen.)
I’ve also noticed that it gets slower each time this happens, presumably due to some accumulation of logic/overhead/calls that’s happening.
Any ideas here? Is there something I can do to “clear out” the memory as I go between instances of the page? I am not opening them as a modal.
Any help would be much appreciated!
App ID: 169788 Screen: “Scale Point Section”
Component with properties
Component’s external Button Tap logic (the alerts are just there for debugging, and the IF is there to keep the extraneous calls from corrupting data):
Component’s internal Button Tap logic: