# Can from\_entity inside the form, holds multiple entity values

**URL:** <https://forum.rasa.com/t/can-from-entity-inside-the-form-holds-multiple-entity-values/52557>\
**Category:** Feedback on Rasa Open Source\
**Created:** [April 13, 2022, 4:51am UTC](https://forum.rasa.com/t/can-from-entity-inside-the-form-holds-multiple-entity-values/52557 "2022-04-13T04:51:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveensiwas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/naveensiwas/32/19331_2.png) [@naveensiwas](https://forum.rasa.com/u/naveensiwas)\
**Post date:** [April 13, 2022, 4:51am UTC](https://forum.rasa.com/t/can-from-entity-inside-the-form-holds-multiple-entity-values/52557/1 "2022-04-13T04:51:00Z")

</div>

Hi All,

I came across with one scenario, where I need to holds multiple entity values to a single slot inside the form. Please find my `domain.yml` code snippet below :-

```auto
slots:
  filter_criteria:
    type: list
    influence_conversation: false
	
forms:
  create_preference_form:
    filter_criteria:
      - type: from_entity
        entity: entity1, entity2, entity3, entity4, entity5

```

Can anyone please help me on this, How I can achieve this (`entity: entity1, entity2, entity3, entity4, entity5`) in RASA.

Thanks in Advanced 🙂

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [April 13, 2022, 10:59pm UTC](https://forum.rasa.com/t/can-from-entity-inside-the-form-holds-multiple-entity-values/52557/2 "2022-04-13T22:59:48Z")

</div>

Yes, you would add a `from_entity` block for each entity.

You’ll find an example in the financial-demo [here](https://github.com/RasaHQ/financial-demo/blob/7627cebef1571d55855b886cf4ac20459af9566c/domain.yml#L92).

---

<div class="post-metadata">

**Author:** ![naveensiwas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/naveensiwas/32/19331_2.png) [@naveensiwas](https://forum.rasa.com/u/naveensiwas)\
**Post date:** [April 14, 2022, 4:03pm UTC](https://forum.rasa.com/t/can-from-entity-inside-the-form-holds-multiple-entity-values/52557/3 "2022-04-14T16:03:41Z")

</div>

Hi @stephens,

Thanks for the suggestions.

Actually in my scenario user will provide multiple entity values in a single message. If user provide one entity value in one message, then I can define block for each entity.

How to define entity block when user provides multiple entities in a single message.

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [April 14, 2022, 4:06pm UTC](https://forum.rasa.com/t/can-from-entity-inside-the-form-holds-multiple-entity-values/52557/4 "2022-04-14T16:06:29Z")

</div>

You still define it the same.

---

<div class="post-metadata">

**Author:** ![naveensiwas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/naveensiwas/32/19331_2.png) [@naveensiwas](https://forum.rasa.com/u/naveensiwas)\
**Post date:** [April 14, 2022, 4:14pm UTC](https://forum.rasa.com/t/can-from-entity-inside-the-form-holds-multiple-entity-values/52557/5 "2022-04-14T16:14:40Z")

</div>

Hi @stephens,

You mean to say, I should define the block for each entity and it should always refer to same slot.

Did I understood it correctly ?

---

<div class="post-metadata">

**Author:** ![itsjhonny](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/itsjhonny/32/20201_2.png) [@itsjhonny](https://forum.rasa.com/u/itsjhonny)\
**Post date:** [April 14, 2022, 5:41pm UTC](https://forum.rasa.com/t/can-from-entity-inside-the-form-holds-multiple-entity-values/52557/6 "2022-04-14T17:41:35Z")

</div>

Look this part in stephens examples

[239 - 254](https://github.com/RasaHQ/financial-demo/blob/7627cebef1571d55855b886cf4ac20459af9566c/domain.yml#L92)

```auto
  search_type:
    type: any
    influence_conversation: false
    mappings:
    - intent: search_transactions
      type: from_trigger_intent
      value: spend
    - intent: check_earnings
      type: from_trigger_intent
      value: deposit
    - type: from_entity
      entity: search_type
      conditions:
      - active_loop: transaction_search_form
    - type: from_entity
      entity: search_type

```

---

<div class="post-metadata">

**Author:** ![naveensiwas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/naveensiwas/32/19331_2.png) [@naveensiwas](https://forum.rasa.com/u/naveensiwas)\
**Post date:** [April 20, 2022, 12:49pm UTC](https://forum.rasa.com/t/can-from-entity-inside-the-form-holds-multiple-entity-values/52557/7 "2022-04-20T12:49:04Z")

</div>

Hi @itsjhonny,

I am new to RASA and not getting exactly how I can define entity block for my scenario. I tried it in many ways but unfortunately none of them worked for me.

Let me explain my scenario to you. I have to build a conversational chatbot where user is trying to create a preference using some filters and the **workflow** goes like this

**User :** I would like to create an preference

**Bot :** Can you please help me with the filter criteria to create a preference.

**User :** I want to apply **HSQ, EEA, IEA, 10GE** filters for my preference.

These **HSQ, EEA, IEA, 10GE** are the values of multiple entity and user will always provide multiple filter values in single message, so I used form to collect the user input and trying to store all the user filter values in a slot (type as list).

I want this slot to hold multiple value like this `filter_criteria : [entity-name: entity-value]`

How can I achieve this using slot and form in RASA ?

---

<div class="post-metadata">

**Author:** ![rustamovilyos](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/rustamovilyos/32/23781_2.png) [@rustamovilyos](https://forum.rasa.com/u/rustamovilyos)\
**Post date:** [January 24, 2024, 7:19am UTC](https://forum.rasa.com/t/can-from-entity-inside-the-form-holds-multiple-entity-values/52557/8 "2024-01-24T07:19:07Z")

</div>

can I set multiple values in examples like this [yaqinlashtir]{“entity”:“instype”, “value”:“zoom\_in”, “value”:“instruction”} ?
