# Multiple activity index variable

**URL:** <https://forum.flowable.org/t/multiple-activity-index-variable/10299>\
**Category:** Flowable Engine\
**Created:** [March 6, 2023, 9:56am UTC](https://forum.flowable.org/t/multiple-activity-index-variable/10299 "2023-03-06T09:56:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathtev](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@mathtev](https://forum.flowable.org/u/mathtev)\
**Post date:** [March 6, 2023, 9:56am UTC](https://forum.flowable.org/t/multiple-activity-index-variable/10299/1 "2023-03-06T09:56:23Z")

</div>

Hello,  
I am using multi instance for user task and I need to somehow keep track of the current loop index.

Is there a way to execute a script in between each loop to increase value of index variable so it’s up to date or is there any other solution?

---

<div class="post-metadata">

**Author:** ![gdharley](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/gdharley/32/2695_2.png) [@gdharley](https://forum.flowable.org/u/gdharley)\
**Post date:** [March 6, 2023, 3:54pm UTC](https://forum.flowable.org/t/multiple-activity-index-variable/10299/2 "2023-03-06T15:54:26Z")

</div>

There is an automatic loop counter that will provide you this feature.  
Refer: [BPMN 2.0 Constructs · Flowable Open Source Documentation](https://www.flowable.com/open-source/docs/bpmn/ch07b-BPMN-Constructs/#multi-instance-for-each)

loopCounter is what I think you are looking for.
