Problem with pages rendering

I have a number of pages where I need to set states on page load. These states count how many records of a particular “thing” the user has in the database. If the count is zero, then I show a splash element that gives the user a button to create a new “thing”. The problem is that it takes a few seconds for the page to count the “things” so the splash screen appears briefly when in fact they do have records.

Any suggestions on how I can let the system do its counting before displaying the splash element

As often is the case, the moment after submitting a help request an idea pops into my head. I got it to work by adding another state called “show splash (yes/no)”. I deselected the " This element is visible on page load" on the splash element and added a condition “this element is visible” when Show Splash is yes. Works great. Not sure what this does to the rendering speed though.

make the condition to → when the state is not empty AND state is 0 → show splash screen (in this case the state can’t have any default value)

Or you could set the initial value of the state for -1 (but I think the other is better)

thanks @ri_scc_94 that helped as it was still doing it for a split second.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.