# Dropdown placeholder text

**URL:** <https://forum.inductiveautomation.com/t/dropdown-placeholder-text/99798>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 13, 2024, 1:37pm UTC](https://forum.inductiveautomation.com/t/dropdown-placeholder-text/99798 "2024-12-13T13:37:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [December 13, 2024, 1:37pm UTC](https://forum.inductiveautomation.com/t/dropdown-placeholder-text/99798/1 "2024-12-13T13:37:28Z")

</div>

Hello!

When I delete values from a multiselect dropdown I want to show a message on the placeholder to clarify you need to have a value in order to aply filters

I delete the values with a button like:

```python
    else:
        # Second click: Clear the selection
        dropdown.props.value = None  
        self.parent.custom.selectAll = False  
        self.props.image.icon.path = "material/done_all"  

        # After resetting the value, update placeholder text
        dropdown.props.placeholder.text = "No hay ninguna sede seleccionada"

        dropdown.props.value = []

```

If I take out values manually the text appear,

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/4/745b3f566d1e46caacc753d569b8c993f81d385f.png)

If I do it with the button it doesn´t show any text:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/1/01a5a5655fe9e7f4589b1f964a0b31459d707ded.png)

I guess I need to trigger the internal logic of the dropdown placholder to do this.

Any ideas welcome.

Cheers.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [December 13, 2024, 1:39pm UTC](https://forum.inductiveautomation.com/t/dropdown-placeholder-text/99798/2 "2024-12-13T13:39:45Z")

</div>

I think the place holder only shows up when the props.value is null. The last line in the script sets it to `[]` not None (null).

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [December 13, 2024, 1:41pm UTC](https://forum.inductiveautomation.com/t/dropdown-placeholder-text/99798/3 "2024-12-13T13:41:59Z")

</div>

Yeah, that´s it! thanks a lot @dkhayes117 !

```python
    else:

        dropdown.props.value = system.util.jsonDecode("null")  
        self.parent.custom.selectAll = False  
        self.props.image.icon.path = "material/done_all"  

```

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 13, 2024, 2:19pm UTC](https://forum.inductiveautomation.com/t/dropdown-placeholder-text/99798/4 "2024-12-13T14:19:47Z")

</div>

> [@Alejandro\_Alaco](#):
>
> ```python
> else:
> dropdown.props.value = system.util.jsonDecode("null") 
> 
> ```

You're in Jython. Shouldn't that be,

```python
else:
    dropdown.props.value = None
    ...

```

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [December 17, 2024, 7:58am UTC](https://forum.inductiveautomation.com/t/dropdown-placeholder-text/99798/5 "2024-12-17T07:58:39Z")

</div>

Yes, with none it works also!

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 17, 2024, 8:53am UTC](https://forum.inductiveautomation.com/t/dropdown-placeholder-text/99798/6 "2024-12-17T08:53:02Z")

</div>

"none" won't work. "None" will.
