I have a page with containers with dynamic list behavior. OnPageEnter, I’m filling these containers by reading data from an API and then do something like
All works fine!
Now I want to have a refresh button on my page, which is repeating the same thing which happens OnPageEnter and I was wondering how create one, resusable codeless artifact for this.
“Function” are obviously not adequate because these are only known in the event handler scope.
“Custom Functions” on the other hand seem to have a global (application wide) scope. I tried “Custom Functions” but this failed because it seems that UI component IDs have page scope and cannot be used as a reference in a custom function. As an example: This custom function
leads to the error
ReferenceError: ___arguments is not defined
I’ve verified that “contacts” is well-defined, so the issue is with “Container2”. Interestingly, I can select Container2 via the dropdown of “Set Dynamics List Items to”.
How can I create this “data refresh” as a reusable function?
I’ve also tried just to use the “Go To Page name” block to reload the very same page, but this leads to other issues, because the page state is completely lost …