camunda-docs
                                
                                
                                
                                    camunda-docs copied to clipboard
                            
                            
                            
                        [FEEL] Add a tip on how to get the current index inside a loop
Description
In some cases, I have a FEEL expression with a for-loop and need to get the current element's index.
There is a trick: count(partial) calculates the current index.
Let's share this tip in the FEEL documentation.
Relevant docs:
- https://docs.camunda.io/docs/components/modeler/feel/language-guide/feel-control-flow/#for-loops
 
Related Slack discussion: https://camunda.slack.com/archives/C01QYD808A3/p1742481110327559