# Indentation error - dropdown

**URL:** <https://forum.inductiveautomation.com/t/indentation-error-dropdown/80252>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 10, 2023, 6:48am UTC](https://forum.inductiveautomation.com/t/indentation-error-dropdown/80252 "2023-10-10T06:48:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Learner\_Ignition](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@Learner\_Ignition](https://forum.inductiveautomation.com/u/Learner_Ignition)\
**Post date:** [October 10, 2023, 6:48am UTC](https://forum.inductiveautomation.com/t/indentation-error-dropdown/80252/1 "2023-10-10T06:48:08Z")

</div>

Hello,  
I am having 3 dropdown and when dropdown1 values gets changes I had written below change script to change properties of other 2 dropdown.

```auto
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.**

**org.python.core.PySyntaxError**  
\*\* 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.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 10, 2023, 7:20am UTC](https://forum.inductiveautomation.com/t/indentation-error-dropdown/80252/2 "2023-10-10T07:20:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Learner\_Ignition](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@Learner\_Ignition](https://forum.inductiveautomation.com/u/Learner_Ignition)\
**Post date:** [October 10, 2023, 7:26am UTC](https://forum.inductiveautomation.com/t/indentation-error-dropdown/80252/3 "2023-10-10T07:26:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [October 10, 2023, 7:33am UTC](https://forum.inductiveautomation.com/t/indentation-error-dropdown/80252/4 "2023-10-10T07:33:53Z")

</div>

Did you try rewriting the whole script from scratch ? No copy-pasting !

---

<div class="post-metadata">

**Author:** ![Learner\_Ignition](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@Learner\_Ignition](https://forum.inductiveautomation.com/u/Learner_Ignition)\
**Post date:** [October 10, 2023, 8:29am UTC](https://forum.inductiveautomation.com/t/indentation-error-dropdown/80252/5 "2023-10-10T08:29:03Z")

</div>

Deleted the dropdown component and added a new dropdown component and pasted the same script.  
Now its working fine.

Thanks
