I use two dropdown box in row:
First one defines menu, second one - parameters in menu. I fill dropdownbox with custom list: list in second dropdown box depends from index of the first one (I need to switch parameters lists for corresponding menu).
I have eight lines on the page and use paging: I switch data references for the lists in PLC. I found my parameters often drops to zero index with dropping parameters in PLC to zero. How can I solve it?
I see following problem here:
When DropDownBox widget is loadind it has no configuration json, so DropDownBox lists is empty.
If DropDownBox widget has no index in DropDown list it always drops to zero.
Configuration json loaded, but index value is already zero.
I think you’ll have to provide a small test project for people to fully understand what you’re trying to do and what the problem is! Either get in contact with your local support, or try uploading it here for someone to have a look at it. (Sample project, just containing your use case and the issue you’re experiencing)
Not sure if I follow your concept 100% but maybe you are better off setting you data provider for the parameter dropdown explicitly through an action whenever the index of the menu changes! This I believe gives you better control over when the data provider should change.
I put together a quick example what that could look like, again like my other me (@krausertm ) said a quick sample or video from your side would be helpful.
The source doesn’t really matter. In my example I used all 3, static (data provider inside the action) and operands to read either the session variable or the data provider string from the a program variable.
If you change the data provider in a program you wouldn’t need 3 actions since the source is already adjusted for the menu selection. If you parameter list is somewhat consistent you could just define them all in session variables or statically since that would remove the operand read.
I cannot set explicitly my data providers, it is built from *.csv database and I need to remove part of parameters depending on equipment mode. I can’t depend dropdownlist data providers on development phase. Now I find the following solution: I use temporary variable for dropdownbox index, and write value there several times, look like it helps.