Hi Power Platform Team,
I am struggling with the 'apply to each' action being added into my flow.
I have a list and several 'list forms' to capture information for people requesting training, learning consultations, projects etc. (an L&D team). See image of flow attached. I have built this exact type of request system before but this time I have 2 fields with multiple selections turned on - the learner name(s) and the how the training need was identified. Both fields could be a single response or could be multiple and I want to allow for this.
When I start adding the data in the first approval I immediately get these 'apply to each' things added and the approval is nested under.
I have this 'apply to each' for the following fields on each approval and email:
Learner(s)
Training need identification
Manager approval comments
Director approval comments
L&D approval comments
SLT approval comments
The problem here is that I have 4 approvals (each to a different level of manager) and after each approval I email the requestor and managers approving for their records. So every approval and every email is getting from 2-5 'apply to each' functions.
The data down the tree only lets me select the original field (learner name(s)) which just creates another 'apply to each' and my nesting issue presents, or I can select the 'current' item from the previous 'apply to each' but from my understanding that will only give me 1 name not all that are submitted in the form. I either exceed the nesting limit of 8 and have 'apply to each' functions absolutely everywhere and get a logic error and can't save or I only get 1 name from a potentially multi name field. I also get this 'apply to each' when I add the 'responses comments' field from an approval into an email or update the list. No idea why this would produce an 'apply to each' when it's a text field.
Is there a way to avoid this or better control these? I'm really hoping there is a simple solution.
Thanks.