AppSheet: How can I create multiple records from an EnumList for two teams?

Hi everyone, can someone help me with this
I have two teams:

  • Team A

  • Team B

I have a Task table containing only 5 tasks:

  • Task #1

  • Task #2

  • Task #3

  • Task #4

  • Task #5

I want to quickly create tasks for each team in bulk, so I created a junction/input table.

The junction table has these fields:

  • Assigned To — Enum: Both Teams / Separately

  • Tasks — EnumList, Ref to the Task table

    • Shown when [Assigned To] = "Both Teams"
  • Tasks for Team A — EnumList, Ref to the Task table

    • Shown when [Assigned To] = "Separately"
  • Tasks for Team B — EnumList, Ref to the Task table

    • Shown when [Assigned To] = "Separately"

Desired behavior

If I create a junction record with:

Assigned To: Both Teams

Tasks:

  • Task #1

  • Task #2

I want AppSheet to automatically create 4 records in the target table:

Team Task
Team A Task #1
Team B Task #1
Team A Task #2
Team B Task #2

Essentially, I need to create one record for every combination of selected Task × Team.

If 3 tasks are selected, it should create 6 records.

If all 5 tasks are selected, it should create 10 records.

For the Separately option, I would want:

Tasks for Team A:

  • Task #1

  • Task #2

Tasks for Team B:

  • Task #2

  • Task #3

To create:

Team Task
Team A Task #1
Team A Task #2
Team B Task #2
Team B Task #3

What is the best AppSheet-native way to implement this?

These search results may provide some insight.