# Use one question to fill two slots in rasa form action

**URL:** <https://forum.rasa.com/t/use-one-question-to-fill-two-slots-in-rasa-form-action/11188>\
**Category:** Rasa Open Source\
**Created:** [June 9, 2019, 10:16am UTC](https://forum.rasa.com/t/use-one-question-to-fill-two-slots-in-rasa-form-action/11188 "2019-06-09T10:16:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![psfr937](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/psfr937/32/2858_2.png) [@psfr937](https://forum.rasa.com/u/psfr937)\
**Post date:** [June 9, 2019, 10:16am UTC](https://forum.rasa.com/t/use-one-question-to-fill-two-slots-in-rasa-form-action/11188/1 "2019-06-09T10:16:38Z")

</div>

I only know how to make a form that each question has 1 to 1 relationship to slot. For now, I have two questions: ` utter_ask_floor`, which maps to floor slot, `utter_ask_flat`, which maps to flat slot. But, it would not be user friendly to always ask two question for two slots.

I want to have a question `utter_ask_floor_and_flat` that asks:

> Which floor and flat are you living in?

and people can answer 18A (eg. `[18](floor) [A](flat)` )

So I want to have three questions, ` utter_ask_floor`, `utter_ask_flat`, `utter_ask_floor_and_flat`.

In case one of the slots (floor or flat) is already filled, it will dispatch utter\_ask\_floor or utter\_ask\_flat as usual.

Because the advantage of form is that it can automatically ask questions if the slots are not filled but skip question if the slot is filled, I only want to ask `utter_ask_floor_and_flat` **if only both floor and flat slots are not filled**.

For example, if the user says “I want a food delivery”, utter\_ask\_floor\_and\_flat will be dispatched.

How can I achieve this?

Thanks

---

<div class="post-metadata">

**Author:** ![JulianGerhard](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juliangerhard/32/3781_2.png) [@JulianGerhard](https://forum.rasa.com/u/JulianGerhard)\
**Post date:** [June 9, 2019, 11:48am UTC](https://forum.rasa.com/t/use-one-question-to-fill-two-slots-in-rasa-form-action/11188/2 "2019-06-09T11:48:11Z")

</div>

Hi @psfr937,

basically your FormAction takes Control over what is uttered. If everything is set as default, the 2 utterances for 2 slots logic will be executed.

To avoid that, meaning to allow e.g.:

a. I want a food delivery to 18A b. to 18 A

You have to ensure that:

a. Your stories allow mentioning of entities while triggering the action with \*start\_food\_action{“floor”: “18”, “flat”: “A”} and other possible combinations

b. Your entities were learned correctly

c. Your Form action validation methods work accordingly:

If you want the form to ask for both parameters at once, you could overload the init method of your FormAction to utter your desired question or you could overload the validate function with the same. Asking for specific slots could be controlled in either validate or validate\_param by following e.g. the example of ActionExecutionRejection .

Did that help? Tell me if you need more help.

---

<div class="post-metadata">

**Author:** ![theainerd](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/theainerd/32/6439_2.png) [@theainerd](https://forum.rasa.com/u/theainerd)\
**Post date:** [September 17, 2019, 12:54pm UTC](https://forum.rasa.com/t/use-one-question-to-fill-two-slots-in-rasa-form-action/11188/3 "2019-09-17T12:54:19Z")

</div>

I’m also facing the same problem, were you able to resolve this?
