# Rasa 2.0 - YAML alphabetical sort breaks form flow

**URL:** <https://forum.rasa.com/t/rasa-2-0-yaml-alphabetical-sort-breaks-form-flow/37085>\
**Category:** Rasa Open Source\
**Created:** [November 17, 2020, 2:29pm UTC](https://forum.rasa.com/t/rasa-2-0-yaml-alphabetical-sort-breaks-form-flow/37085 "2020-11-17T14:29:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fabrice-toussaint](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fabrice-toussaint/32/11162_2.png) [@fabrice-toussaint](https://forum.rasa.com/u/fabrice-toussaint)\
**Post date:** [November 17, 2020, 2:29pm UTC](https://forum.rasa.com/t/rasa-2-0-yaml-alphabetical-sort-breaks-form-flow/37085/1 "2020-11-17T14:29:52Z")

</div>

Hi,

When I make changes to my domain.yml it puts everything into alphabetical order. However, since my forms are in there as well, the slots are asked in a different order (alphabetical one) then how I set them.

Is there a workaround for this?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![jjuzl](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@jjuzl](https://forum.rasa.com/u/jjuzl)\
**Post date:** [November 20, 2020, 11:00am UTC](https://forum.rasa.com/t/rasa-2-0-yaml-alphabetical-sort-breaks-form-flow/37085/2 "2020-11-20T11:00:47Z")

</div>

Hi @fabrice-toussaint

One workaround could be to implement `required_slots` on a custom action for your form. See: [Forms](https://rasa.com/docs/rasa/forms/#dynamic-form-behavior).

---

<div class="post-metadata">

**Author:** ![fabrice-toussaint](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fabrice-toussaint/32/11162_2.png) [@fabrice-toussaint](https://forum.rasa.com/u/fabrice-toussaint)\
**Post date:** [November 24, 2020, 11:16am UTC](https://forum.rasa.com/t/rasa-2-0-yaml-alphabetical-sort-breaks-form-flow/37085/3 "2020-11-24T11:16:00Z")

</div>

Hi @jjuzl,

I implemented this with this method:

```
async def required_slots(
        self,
        slots_mapped_in_domain: List[Text],
        dispatcher: "CollectingDispatcher",
        tracker: "Tracker",
        domain: "DomainDict",
) -> Optional[List[Text]]:
    """ Set order of slots """
    return ['z_slot', 'a_slot'] 

```

When I deploy using Kubernetes with Helm Charts & Github Actions this does not seem te be working but when I run it locally it does work. At first my a\_slot gets asked instead of my z\_slot. I also checked the code on Github and it is the same as when I run it locally. Do you have any idea why this is happening?

---

<div class="post-metadata">

**Author:** ![jjuzl](https://avatars.discourse-cdn.com/v4/letter/j/dbc845/32.png) [@jjuzl](https://forum.rasa.com/u/jjuzl)\
**Post date:** [November 24, 2020, 2:31pm UTC](https://forum.rasa.com/t/rasa-2-0-yaml-alphabetical-sort-breaks-form-flow/37085/4 "2020-11-24T14:31:01Z")

</div>

Can you please confirm that your custom action is definitely being called, (and specifically the method `required_slots`)?

---

<div class="post-metadata">

**Author:** ![fabrice-toussaint](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/fabrice-toussaint/32/11162_2.png) [@fabrice-toussaint](https://forum.rasa.com/u/fabrice-toussaint)\
**Post date:** [November 24, 2020, 3:00pm UTC](https://forum.rasa.com/t/rasa-2-0-yaml-alphabetical-sort-breaks-form-flow/37085/5 "2020-11-24T15:00:29Z")

</div>

I can 100% confirm that it is being called, I added this test:

```
print("This is being called")

```

and got this as a result in the actions server:

```
This is being called
```
