# Story for "recursive" action on input

**URL:** <https://forum.rasa.com/t/story-for-recursive-action-on-input/19885>\
**Category:** Rasa Open Source\
**Created:** [October 16, 2019, 8:55am UTC](https://forum.rasa.com/t/story-for-recursive-action-on-input/19885 "2019-10-16T08:55:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pantelhs](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/pantelhs/32/4968_2.png) [@Pantelhs](https://forum.rasa.com/u/Pantelhs)\
**Post date:** [October 16, 2019, 8:55am UTC](https://forum.rasa.com/t/story-for-recursive-action-on-input/19885/1 "2019-10-16T08:55:22Z")

</div>

Hello i would like to ask you what’s the best practise when writting stories for a “recursive” scenario. I have a custom action which fetches assignements for the user and gives him the option to send him the details for each if he requests them. Sample dialog:

- User: what assignments i have?
- Rasa: You have 3 assignements
- User: tell me
- Rasa: First assignment …
- User: next
- Rasa: Second assignement …
- User: next
- etc.

What’s best practise for syntaxing stories for a scenario like the one mentioned above, where the number of assignments varies.

---

<div class="post-metadata">

**Author:** ![dakshvar22](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dakshvar22/32/3993_2.png) [@dakshvar22](https://forum.rasa.com/u/dakshvar22)\
**Post date:** [October 22, 2019, 11:06am UTC](https://forum.rasa.com/t/story-for-recursive-action-on-input/19885/2 "2019-10-22T11:06:59Z")

</div>

You can set a slot value with number of assignments already requested and then in your custom action based on the set slot value fetch the next assignment.
