Hello,
I am working on approval process for overtime. This is linked to a SP list with staff names being drawn from AD (Person Column).
I have got the Approval flow build and it works reasonably well for one person assigned to the overtime, but when I add 2 or more people there I started having issues:
1. As the format was suddenly an array (when having 2 or more people assigned), I could not read the names directly, I found solution online by using Select and Compose (with join function) steps
So the names will go through the flow, now however in ["Name A", "Name B"] format.
2. When the Approval flow runs and other requests are completed straight after the first one is sent out, the flow starts mixing the names into the Approval list
I will receive the right amount of Approval requests, but with mixed names, It does not happen for single names approval requests).
So what I am trying to resolve is:
For 1. Tidy up the format the Names come in - essentially looking for Name A, Name B only (no quotation or bracket marks)
For 2. Way of ensuring the flow runs only for the individual names assigned to one particular approval request, without mixing the names from sub sequential requests.
My flow look currently like this:
Kind Regards
Hi @grantjenkins , I have finally managed to get some time to come back to the Flow.
I went through the steps and for some reason the Select function keeps using loop and if I take the Select out, the flow will not run and the error will be on the Select function - looking for an array.
Please would you have any further thoughts on this?
Hello @grantjenkins ,
I tried running the flow with Select/Join outside Apply to each however it gives an error.
Unsure if this might be due to column formatting, but the names come from Person column, where the number of staff can be from 1 to x.
Any thoughts?
The issue might be because you have the Select and Join within an Apply to each. There is no need to use a loop.
This is in Select
and this in Join
The output is as below
Can you should what you put in your Select and Join? I'm not sure why it would show correctly in the output of the Join but not in the Email.
Yes, I used the output from Join
Are you sure you used the output from the Join Names and not the Select Names?
Hello @grantjenkins
Thank you for looking into it. I was after the Staff Names (Display Names) from multi-select person column, so that is perfect. It seems that the Select/Join operations work (when I look at the output body I get Name A, Name B, however when I then use the Output from Join operation within Approval or Email it will put it back to ["Name A", "Name B"].
My flow looks as shown below (if it helps):
Any thoughts on this?
I'm assuming you want to get the emails and display names from the multi-select Person column.
See flow below. I'll go into each of the actions.
When an item is created is the same as what you have.
Select Emails and Select Names (both Select actions) extract the Emails and Display Names from the Staff Name Person column.
Join Emails and Join Names (both Join actions) use the output from Select Emails and Select Names respectively.
Join Emails uses a semi-colon for the separator ';'
Join Names uses a comma and a space for the separator ', '
After running the flow we would get the following output. You can see that you can use the output from Join Emails in your Start and wait for an approval action and Join Names in your Send an email action.