# Slot value not set

**URL:** <https://forum.rasa.com/t/slot-value-not-set/48061>\
**Category:** Rasa Open Source\
**Created:** [September 28, 2021, 8:29am UTC](https://forum.rasa.com/t/slot-value-not-set/48061 "2021-09-28T08:29:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chiragRade](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chiragrade/32/17315_2.png) [@chiragRade](https://forum.rasa.com/u/chiragRade)\
**Post date:** [September 28, 2021, 8:29am UTC](https://forum.rasa.com/t/slot-value-not-set/48061/1 "2021-09-28T08:29:09Z")

</div>

I m trying to set value of a slot after an intent, but the value of slot is not set and it remains null this a portion of my story ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/d/e/deec6e6beddce39e4fb05b2ba94c0c6b1272f31c.png)

And this is my domain file ![image](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/c/3/c35470cbc639b67bfd5edb7e1081d0078103ce89.png)the issue is with slot project , slot item works fine as i m using entity when before setting its value in the story

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [September 28, 2021, 2:22pm UTC](https://forum.rasa.com/t/slot-value-not-set/48061/2 "2021-09-28T14:22:52Z")

</div>

If the `project` entity is not found in the message, its value won’t be saved.

What you can do is, in `action_fetch_project`, check the intent of the last message (with `tracker.get_intent_of_latest_message()`) and return a SlotSet according to it:

```python
intent = tracker.get_intent_of_latest_message()

if intent == 'nlp':
    return [SlotSet('project': 'nlp')]
elif intent == 'ai':
    return [SlotSet('project': 'ai')]
else:
    return []

```

---

<div class="post-metadata">

**Author:** ![chiragRade](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chiragrade/32/17315_2.png) [@chiragRade](https://forum.rasa.com/u/chiragRade)\
**Post date:** [September 28, 2021, 3:04pm UTC](https://forum.rasa.com/t/slot-value-not-set/48061/3 "2021-09-28T15:04:33Z")

</div>

Thanks, it was very helpful…

---

<div class="post-metadata">

**Author:** ![ChrisRahme](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chrisrahme/32/15572_2.png) [@ChrisRahme](https://forum.rasa.com/u/ChrisRahme)\
**Post date:** [September 28, 2021, 3:21pm UTC](https://forum.rasa.com/t/slot-value-not-set/48061/4 "2021-09-28T15:21:02Z")

</div>

Glad to be of help 🙂

By the way, you can also do it using [Forms](https://rasa.com/docs/rasa/forms) with [from\_intent mapping](https://rasa.com/docs/rasa/forms#from_intent) for the slot.

---

<div class="post-metadata">

**Author:** ![chiragRade](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chiragrade/32/17315_2.png) [@chiragRade](https://forum.rasa.com/u/chiragRade)\
**Post date:** [September 28, 2021, 3:23pm UTC](https://forum.rasa.com/t/slot-value-not-set/48061/5 "2021-09-28T15:23:35Z")

</div>

i will look into it… which ever way suits the code better will go with that

---

<div class="post-metadata">

**Author:** ![abdiansah](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abdiansah/32/17393_2.png) [@abdiansah](https://forum.rasa.com/u/abdiansah)\
**Post date:** [October 3, 2021, 2:08pm UTC](https://forum.rasa.com/t/slot-value-not-set/48061/6 "2021-10-03T14:08:30Z")

</div>

I have the same problem and still no have solution. The problem is how to get slot variabel without using entity or custom action?

In RASA documentation, the slot variable can be captured without using entity or custom action, just slot variable.

You can visit the URL:

[https://rasa.com/docs/rasa/responses](https://rasa.com/docs/rasa/responses)

Here is the screenshot:

 ![rasa-doc-ss](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/3X/d/d/dd8ff4e1a89cdfe6477789f7a14c13c9c91788ac.png)

---

<div class="post-metadata">

**Author:** ![abdiansah](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abdiansah/32/17393_2.png) [@abdiansah](https://forum.rasa.com/u/abdiansah)\
**Post date:** [October 3, 2021, 2:10pm UTC](https://forum.rasa.com/t/slot-value-not-set/48061/7 "2021-10-03T14:10:55Z")

</div>

Are your problem has clear, bro?

I have the same problem, how to get slot variable without using entity or custom action?

---

<div class="post-metadata">

**Author:** ![chiragRade](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/chiragrade/32/17315_2.png) [@chiragRade](https://forum.rasa.com/u/chiragRade)\
**Post date:** [October 3, 2021, 2:43pm UTC](https://forum.rasa.com/t/slot-value-not-set/48061/8 "2021-10-03T14:43:58Z")

</div>

I used a work around , and it worked for me, in my use case i could make do with just the intent of the last message , else you can also use a custom action and trigger it when a given intent is encountered to set the slot as mentioned above. If you want you can connect with me on discord now , and maybe we can brainstorm a good solution for you my discord: uKNOWwho#8242
