Keep hidden layers active

I’ve created a layer with a frame and textboxes that do what I need them to do, and it works great. When the user needs to change one of the values, they click a box, it shows the layer and its frame, they do their thing and they click a close button which hides the layer again.

But, I just discovered that when I hide the layer, it goes inactive. I need the textboxes on that layer to be readable (by script) and to update when a filter on the main layer is changed.

What options do I have here? Or am I going about this all wrong?

Hi Ken,
I had, more or less the same issue with the layers, and I have changed my approach in order to use groups that I show/hide depending on the button clicked on one layer only, giving me the possibility to have access to all the adapters.
Please check this and see if you can use it for your use-case:

I hope this helps.
Olivier

1 Like

Hi Ken,

If you were trying to read the text from a textbox while its layer is hidden, this shouldn’t have been an issue because all objects remain readable through script. Using a text box filter, parameterTextBox1.control.value](https://www.dundas.com/support/api-docs/js/#API%20Reference/dundas/controls/ParameterTextBox/Properties/value.html) provides the text entered into the textbox before the layer was hidden. I’m not sure what you meant by keeping the layer active, but what I know is that controls such as visualizations won’t draw or retrieve data automatically when hidden. Were you trying to get the filters to update automatically in some way while the layer was hidden, and does the same thing work while the layer is visible?

1 Like

You nailed it. I can read the boxes, but the table I’m using to populate that textbox doesn’t update when hidden, so that’s why I thought I couldn’t read from it. It works fine when not hidden, so I know it’s purely a function of not being “active” when hidden.

I’m going to try Olivier’s solution and see if it does the trick. Thanks!

That’s genius. I will still put it into a layer, I think, so I can hide it and unhide it easily when debugging, but for the user end I can just do that to maintain functionality. Thank you!!