Worflow data array access

Hello I am creating a workflow that trigger post action,
When I create a ‘Competition’ I also Insert an array of Groups and Each Group has Many teams that I select using a select list.

Competion has OneToMany relation with Groups and Groups Has ManyToMany relation with teams.

Basically I want to create a workflow that will loop through Groups And then for each one loop through it’s teams to create matches.

My problem is when I loop through teams I can’t find to acces the n+1 team so I can create a match.
Exemple:
Group 1
Team A
Team B
Team C

I want to create 3 matches as follow:
Match 1 : Home Team: Team A - Away Team B
Match 2 : Home Team: Team A - Away Team C
Match 3 : Home Team: Team B - Away Team C

Any help ?

ESS :smiling_face_with_three_hearts: :tunisia: :tunisia: :tunisia:

Glad to find Tunisian’s using nocobase

Good question.

You may need do another loop inside your loop on teams. And use condition node to skip matched teams. The condition could be “Inner loop / Loop index > Outer loop / Loop index”.

Here is an example flow: