Hi smart people,
Hope you can help me with the following situation (I start a new topic, because I gave myself replies in my last post):
- One person uploads document(s) using Forms and fills in other email addresses (up to 6)
- I send an 'Approval' to all the email addresses the person filled in on the Form.
- In an Apply to each loop I gather User Information (Get user Profile (V2)).
- I have it working until here
But then, after everyone approved, I want to use the 'Get user profile (V2)' information and store that per approver in different columns in a SP List (for example: DisplayName, givenName, surname, employeeId, mail). So my columns are named mail1, mail2, mail3, mail4, mail5 and mail6 (and also for the other values: like DisplayName1 up to 6, etc).
I've tried the steps below, but what happens, is that now only the last of the 'apply to each-loop' appears in de column in the list:

- I sort of hoped that every name would appear in the column (comma seperated - to later separate them to different columns)
- But I actually want every name to appear in different columns of the list
Then I added a Compose action, right after the 'Apply to each' loop, that joins the information gathered in the Compose action that is in the loop:

The output is this (so it DOES gather the information that I want):
{"@odata.context":"https://graph.microsoft.com/.../...(displayName,employeeId,mail,givenName,surname)/$entity ",
"displayName":"Name of Person 1","employeeId":"ID of Person 1","mail":"email of Person 1","givenName":"Given name of Person 1"},
{"@odata.context":"https://graph.microsoft.com/.../...(displayName,employeeId,mail,givenName,surname)/$entity ",
"displayName":"Name of Person 2","employeeId":"ID of Person 2","mail":"mail of Person 2","givenName":"Given name of Person 2","surname":"Surname of Person 2"}
But still... how can I use or split the info and put it in different columns in a SP List?
Another idea that I had was to initialize a variable (array) and get all the profiles in an apply to each (after 'Start and wait for an approval' with an append to array variable), but I'm in doubt on how to split the information afterwards per approver? Or maybe something with filtering an array? But then, I first have to built an array with the information?
Anybody an idea on how to do this?
Help is much appreciated! Thanks in advance 🙏
Femke