I want to control the visibility of certain content on my page based on the loading state of a reusable element. I’ve tried a few approaches, but I’m having trouble achieving the desired result.
Current Setup:
Reusable Element: “REreport”
State in Reusable Element: IsLoaded (Yes/No)
Goal: Show or enable specific content on the page only when the IsLoaded state of the reusable element is ‘yes.’
What would be the correct workflow setup to ensure that content is displayed only when the IsLoaded state of the reusable element is ‘yes’?
The conditionals dont work? Because I have a similar setup and it works like a charm. Elements in the page will be visible or not conditionally based on RE’s flag.
In my reusable element, I have a custom state called “Status.” This state is not on the main element but on an element inside the reusable element. This arrangement is necessary because I am utilizing embedding within this element.
When the status is set to “Rendered,” the content in the embedding is fully loaded. In my workflow, in the step following “Set state to Status = Rendered,” I have “Set State to RepatingElement isLoaded = YES.”
On my page, I hide all elements and display a spinner until various conditions are met. One of these conditions is:
When the page is loaded (Only when Page loaded entirely is yes and “the repating element”'s isLoaded is YES): Show header/Footer/Navigation/Main content.
However, my page is only loading, and the custom state isLoaded doesn’t seem to be activated.
But it seems like the Reusable element doesn’t load as long as it’s not visible on the page? Cause my page is just loading and loading and the Condition never get true.
More like sonething is not working. Are you sure pbireport rendered is working successfully? Because custom states work as you see in my demo. This is definitely something related to some external event not firing or working as you expect.
My suggestion in these cases is try to localize the problem as much as possible. If it is complicated and in a bigger setup, you cant easily find a solution.
Create an empty new app and just test this pbirendered issue.
Do something on the page when it is rendered or loaded.
Then, put it inside a reusable and again doing something small.
Then, slowly bring it to your setup on your actual app.
You will find what is the problem at some point. Good luck.