# Mutiple each functions

**URL:** <https://community.openfn.org/t/mutiple-each-functions/127>\
**Category:** Job Writing\
**Created:** [July 26, 2021, 11:32pm UTC](https://community.openfn.org/t/mutiple-each-functions/127 "2021-07-26T23:32:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brendonGS](https://community.openfn.org/letter_avatar_proxy/v4/letter/b/ecccb3/32.png) [@brendonGS](https://community.openfn.org/u/brendonGS)\
**Post date:** [July 26, 2021, 11:32pm UTC](https://community.openfn.org/t/mutiple-each-functions/127/1 "2021-07-26T23:32:29Z")

</div>

Hello,

I have just noticed that when I use mutiple each() functions, only one gets recognized and the others are ignored.

How do I make sure the other each() functions are executed? I’m using a kobotoolbox form which has mutiple array quetions hence the use case for mutiple each() functions.

edit: I also found the option of beta.each(), but the function is not available. I’m using a PostgreSQL database.

---

<div class="post-metadata">

**Author:** ![taylordowns2000](https://community.openfn.org/user_avatar/community.openfn.org/taylordowns2000/32/165_2.png) [@taylordowns2000](https://community.openfn.org/u/taylordowns2000)\
**Post date:** [July 27, 2021, 6:16am UTC](https://community.openfn.org/t/mutiple-each-functions/127/2 "2021-07-27T06:16:50Z")

</div>

Check out the documentation for each, and specifically “beta.each”: [https://docs.openfn.org/documentation/jobs/each/#betaeach](https://docs.openfn.org/documentation/jobs/each/#betaeach)

The issue is that `each(...)` actually changes your scope. To perform the operation on everything inside the “each” and then re-scope to the top-level, use `beta.each`.

For technical docs—_and to propose changes! I don’t love how we do the `beta`_—see:

- **`each`** : [language-common/src/Adaptor.js at main · OpenFn/language-common · GitHub](https://github.com/OpenFn/language-common/blob/master/src/Adaptor.js#L213-L250)

- **`beta.each`** : [language-common/src/beta.js at main · OpenFn/language-common · GitHub](https://github.com/OpenFn/language-common/blob/master/src/beta.js#L2-L52)
