I am having 3 dropdown and when dropdown1 values gets changes I had written below change script to change properties of other 2 dropdown.
def valueChanged(self, previousValue, currentValue, origin, missedEvents):
self.getSibling("Dropdown_2").props.options = 
self.getSibling("Dropdown_1").props.value = ""
In session I am getting desired output, however in wrapper log and in designer I am getting below error
Unable to run property change script on Dropdown_0.props.value: code could not be compiled.
** File "function:valueChanged", line 4**
SyntaxError: mismatched input '\n\n' expecting INDENT
Ignition v8.1.32 (b2023091211)
Java: Azul Systems, Inc. 11.0.18
I crosschecked the indent there I don't see any issue.
Is that the whole script ? The "\n\n" on line 4 seems suspicious to me. line 4 should be the empty one after the script, I can't think of a reason an empty line would raise a syntax error.
Yes that's the complete script and there is nothing on 4th Line.
It can create confusion so to avoid that I copied 4th Line also so its easy to understand there is nothing on 4th line.
- Dropdown2 have fixed options.
- Dropdown3 options changes depend on Dropdown1 and Dropdown2 selection. (written change script on Dropdown2)
- I want to clear the selection of dopdown1 and dropdown2 so I wrote the script.
Did you try rewriting the whole script from scratch ? No copy-pasting !
Deleted the dropdown component and added a new dropdown component and pasted the same script.
Now its working fine.