# Is there a way to change the default slot value from None to something else?

**URL:** <https://forum.rasa.com/t/is-there-a-way-to-change-the-default-slot-value-from-none-to-something-else/15649>\
**Category:** Rasa Open Source\
**Created:** [September 13, 2019, 1:32pm UTC](https://forum.rasa.com/t/is-there-a-way-to-change-the-default-slot-value-from-none-to-something-else/15649 "2019-09-13T13:32:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![agrawal-mohit](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/agrawal-mohit/32/2717_2.png) [@agrawal-mohit](https://forum.rasa.com/u/agrawal-mohit)\
**Post date:** [September 13, 2019, 1:32pm UTC](https://forum.rasa.com/t/is-there-a-way-to-change-the-default-slot-value-from-none-to-something-else/15649/1 "2019-09-13T13:32:35Z")

</div>

Hi, I would like to show a zero length string “” whenever a slot value is not set, instead of None. Is it possible?

---

<div class="post-metadata">

**Author:** ![Gehova](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Gehova](https://forum.rasa.com/u/Gehova)\
**Post date:** [September 13, 2019, 2:39pm UTC](https://forum.rasa.com/t/is-there-a-way-to-change-the-default-slot-value-from-none-to-something-else/15649/2 "2019-09-13T14:39:37Z")

</div>

Yes, you can define an initial value in the domain, for example:

```
slots:
  myslot:
    counter: '0'
    type: unfeaturized

```

Just be careful with the text type, the policy just sees a 1 or 0 depending if the slot is set or not.

---

<div class="post-metadata">

**Author:** ![IgNoRaNt23](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ignorant23/32/8029_2.png) [@IgNoRaNt23](https://forum.rasa.com/u/IgNoRaNt23)\
**Post date:** [September 16, 2019, 7:47am UTC](https://forum.rasa.com/t/is-there-a-way-to-change-the-default-slot-value-from-none-to-something-else/15649/3 "2019-09-16T07:47:20Z")

</div>

Be careful, when using FormActions. It considers a slot as set, if the value is not None. So the FormActions wont be useable any more, if you set default values to all slots.

To show custom strings in the template messages, look [here](http://forum.rasa.com/t/can-we-pass-array-data-to-dispatcher/15114)

---

<div class="post-metadata">

**Author:** ![teresalazar13](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/teresalazar13/32/11081_2.png) [@teresalazar13](https://forum.rasa.com/u/teresalazar13)\
**Post date:** [November 18, 2019, 11:32am UTC](https://forum.rasa.com/t/is-there-a-way-to-change-the-default-slot-value-from-none-to-something-else/15649/4 "2019-11-18T11:32:54Z")

</div>

I tried this and it didn’t work. I got this error while training:

```
TypeError: __init__ () got an unexpected keyword argument 'counter'
```

---

<div class="post-metadata">

**Author:** ![Gehova](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Gehova](https://forum.rasa.com/u/Gehova)\
**Post date:** [November 19, 2019, 2:24pm UTC](https://forum.rasa.com/t/is-there-a-way-to-change-the-default-slot-value-from-none-to-something-else/15649/5 "2019-11-19T14:24:30Z")

</div>

I made a mistake while modifying the code for the publication.

```auto
slots:
  counter:
    initial_value: '0'
    type: unfeaturized

```

---

<div class="post-metadata">

**Author:** ![teresalazar13](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/teresalazar13/32/11081_2.png) [@teresalazar13](https://forum.rasa.com/u/teresalazar13)\
**Post date:** [November 19, 2019, 5:12pm UTC](https://forum.rasa.com/t/is-there-a-way-to-change-the-default-slot-value-from-none-to-something-else/15649/6 "2019-11-19T17:12:09Z")

</div>

Thank you. However, my slot remains “None” when starting the form instead of having the initial\_value
