I’m not sure if my concern is related to the topic but I want to have proper understanding on the application of Conditional Region in App Connect. In my experience, sometimes upon the application loads I can see the glimpse of the region that suppose to be hidden before it hidden based on condition set. Does it mean that the corresponding script doesn’t wait for the condition to complete before deciding to show or hide the region, but runs asynchronously. I thought conditional region should be hidden by default until the condition is met.
What is the expression used for the conditional region and when exactly does the conditional region show?
if server connect output has no item
Not sure if I understand correctly but when the page loads, I can see a glimpse of the region before it hidden.
So what is the expression used? Paste it here please.
dmx-bind:condition="!output_ps_per.data.query_ps_per.hasItems()"
Maybe you want to check if the server action is still executing, so try this:
dmx-bind:condition="!output_ps_per.state.executing && !output_ps_per.data.query_ps_per.hasItems()"
Does make sense, I understand that will work, thank you. But my concern still remains because I probably need to apply that every time and that will add extra step to my workflow, especially when the condition is quite complex. Is it possible to have an option (like checkbox on the UI) for when conditional region to show when the condition is not executing or done executing, or perhaps to improvise the heart or the script so that'll be default setting. I'm trying to have understanding on how the function works so let me know if that's possible.
Not sure if the conditional regions can be improved in a way like that, maybe @patrick can check this.
But not all that use cases of CRs depend on SC data.
Is it safe to assume that it is showing because initially the SC component has data?
I don’t know if that is the case and how you are designing your page but if you are getting a glimpse because there is data and you shouldn’t have data at that point you can check the .reset() method just added yesterday to clear the data in a server connect component.
This might be a contributing factor that slows down the sc because it is filtered by get variable, but shouldn't be an issue because it's not like I did something wrong off the specs. I think the real issue is when (or how) the conditional region function is executed. I don't the see the glimpse anymore after checking if the sc is not executing as Teodor suggested.