# RASA X change slots order in form

**URL:** <https://forum.rasa.com/t/rasa-x-change-slots-order-in-form/38006>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [December 13, 2020, 10:42pm UTC](https://forum.rasa.com/t/rasa-x-change-slots-order-in-form/38006 "2020-12-13T22:42:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BarMin](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@BarMin](https://forum.rasa.com/u/BarMin)\
**Post date:** [December 13, 2020, 10:42pm UTC](https://forum.rasa.com/t/rasa-x-change-slots-order-in-form/38006/1 "2020-12-13T22:42:43Z")

</div>

Hi, I wanted to ask if there is a reason for alphabetical order of slots used by forms (defined in domain file) when using RASA X?

I have something like this in my domain file:

```auto
 personal_data_form:
    name_and_surname:
      - entity: persName
        type: from_entity
    date_of_birth:
      - entity: time
        type: from_entity

```

When I start RASA X on my server, it edits my domain file and introduce an alphabetical order to my slots. Like this:

```auto
personal_data_form:
    date_of_birth:
      - entity: time
        type: from_entity
    name_and_surname:
      - entity: persName
        type: from_entity

```

Is that a desired behavior? I want my form to ask for name first (and then for date of birth). Rasa shell works just fine, but RASA X breaks the order of my slots and the dialog is incoherent.

Thanks in advance for response/advice.

---

<div class="post-metadata">

**Author:** ![marcos.allysson](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/marcos.allysson/32/12107_2.png) [@marcos.allysson](https://forum.rasa.com/u/marcos.allysson)\
**Post date:** [December 14, 2020, 12:36am UTC](https://forum.rasa.com/t/rasa-x-change-slots-order-in-form/38006/2 "2020-12-14T00:36:12Z")

</div>

@BarMin, you can use custom action to ask for the next action, i’ll send you the docs of [teaching how you should do.](https://rasa.com/docs/rasa/forms#using-a-custom-action-to-ask-for-the-next-slot) Hope it helps 😃

---

<div class="post-metadata">

**Author:** ![kearnsw](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kearnsw/32/4838_2.png) [@kearnsw](https://forum.rasa.com/u/kearnsw)\
**Post date:** [December 14, 2020, 7:09am UTC](https://forum.rasa.com/t/rasa-x-change-slots-order-in-form/38006/3 "2020-12-14T07:09:50Z")

</div>

AFAIK, this is a bug in the current version of Rasa X and a tracked issue. It should be fixed in a release soon. In the meantime, you can use the custom action workaround in the comment above.

---

<div class="post-metadata">

**Author:** ![BarMin](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@BarMin](https://forum.rasa.com/u/BarMin)\
**Post date:** [December 14, 2020, 1:20pm UTC](https://forum.rasa.com/t/rasa-x-change-slots-order-in-form/38006/4 "2020-12-14T13:20:43Z")

</div>

Thanks for the answers. I actually just add numbers to my slots like:

```auto
    1_name_and_surname:
      - entity: persName
        type: from_entity
    2_date_of_birth:
      - entity: time
        type: from_entity

```

It’s not very beautiful, but it works both in RASA X and RASA and I didn’t have to create any custom actions this way (less code is always better :D)

When this bug will be fixed i will just remove the indices and that’s it.

---

<div class="post-metadata">

**Author:** ![snek](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/snek/32/13510_2.png) [@snek](https://forum.rasa.com/u/snek)\
**Post date:** [February 15, 2021, 4:15pm UTC](https://forum.rasa.com/t/rasa-x-change-slots-order-in-form/38006/5 "2021-02-15T16:15:08Z")

</div>

Hey!

I like the discussion going on here. Been running into a similar use-case where I want my form to run in a certain order. So I take it, @BarMin that your users are always asked to fill a requested slot in the order you set up there? Also, that’s a great hacky fix 😃

---

<div class="post-metadata">

**Author:** ![snek](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/snek/32/13510_2.png) [@snek](https://forum.rasa.com/u/snek)\
**Post date:** [February 15, 2021, 4:15pm UTC](https://forum.rasa.com/t/rasa-x-change-slots-order-in-form/38006/6 "2021-02-15T16:15:20Z")

</div>

@kearnsw, has this bug been resolved in the latest release yet?

---

<div class="post-metadata">

**Author:** ![BarMin](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@BarMin](https://forum.rasa.com/u/BarMin)\
**Post date:** [February 16, 2021, 10:30am UTC](https://forum.rasa.com/t/rasa-x-change-slots-order-in-form/38006/7 "2021-02-16T10:30:49Z")

</div>

Yes. That’s correct. Numbers are actually necessary only if you use RASA X, because it sorts the slots by name and save it back to domain.yml (very annoying bug). RASA X is not open-source, so… There is no way to fix it properly on your own.

If you use RASA service only - then it works just fine (because RASA doesn’t sort anything) and the order of slots is preserved just fine and no numbering is needed.
