Mosses
Β Β·Β [moe-zus]

How to update and trigger the state of the widget when navigating from another page?

Resolved

πŸ‘‹

This is a follow-up to this post.

My ListView lists the records based on toggle switch selection, when on, shows the user's records, and when off, shows all records.

I have links from other pages that either show all records or only users' records. How can I pass a parameter and, based on that param, be able to not only update the state of the widget but also trigger a refresh of the list view respectively?

Currently, I have a boolean page param, showMyReports that I set to True when passing from another page. See screenshot. In the reportList page, I can update the toggle status based on setting conditions in the Switch Initial Value, but I'm not able to figure out how to force a database refresh. Do I need to set up an App State variable as well, besides the Page State one? Guidance appreciated.

1
1 reply