Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Obtaining individual Display Names from SP List for Overtime Approval

(0) ShareShare
ReportReport
Posted on by

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).

Ajwou_2-1700819956536.png

 

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

Ajwou_0-1700819603749.png

Ajwou_1-1700819652449.png

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

Ajwou_3-1700820170253.png

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:

Ajwou_4-1700820503393.png

 

Kind Regards

  • Ajwou Profile Picture
    Ajwou on at
    Re: Obtaining individual Display Names from SP List for Overtime Approval

    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. 

    Ajwou_0-1712140615412.png

    Please would you have any further thoughts on this?

     

  • Ajwou Profile Picture
    Ajwou on at
    Re: Obtaining individual Display Names from SP List for Overtime Approval

    Hello @grantjenkins , 

     

    I tried running the flow with Select/Join outside Apply to each however it gives an error.

    Ajwou_0-1701417441409.png

    Ajwou_1-1701417460703.png

     

    Ajwou_2-1701417481804.png

     

    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?

     

  • grantjenkins Profile Picture
    grantjenkins 11,057 on at
    Re: Obtaining individual Display Names from SP List for Overtime Approval

    The issue might be because you have the Select and Join within an Apply to each. There is no need to use a loop.

  • Ajwou Profile Picture
    Ajwou on at
    Re: Obtaining individual Display Names from SP List for Overtime Approval

    This is in Select

    Ajwou_3-1700841511282.png

     

    and this in Join

    Ajwou_4-1700841523977.png

     

     

    The output is as below

    Ajwou_2-1700841483057.png

     

  • grantjenkins Profile Picture
    grantjenkins 11,057 on at
    Re: Obtaining individual Display Names from SP List for Overtime Approval

    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.

  • Ajwou Profile Picture
    Ajwou on at
    Re: Obtaining individual Display Names from SP List for Overtime Approval

    Yes, I used the output from Join

    Ajwou_0-1700840439703.png

     

  • grantjenkins Profile Picture
    grantjenkins 11,057 on at
    Re: Obtaining individual Display Names from SP List for Overtime Approval

    Are you sure you used the output from the Join Names and not the Select Names?

  • Ajwou Profile Picture
    Ajwou on at
    Re: Obtaining individual Display Names from SP List for Overtime Approval

    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"]. 

    Ajwou_0-1700836658191.png

    My flow looks as shown below (if it helps):

    Ajwou_1-1700836921802.png

    Any thoughts on this?

  • grantjenkins Profile Picture
    grantjenkins 11,057 on at
    Re: Obtaining individual Display Names from SP List for Overtime Approval

    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.

    grantjenkins_4-1700833169817.png

     

    When an item is created is the same as what you have.

    grantjenkins_1-1700832811207.png

     

    Select Emails and Select Names (both Select actions) extract the Emails and Display Names from the Staff Name Person column.

    grantjenkins_2-1700832982802.png

     

    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 ', '

    grantjenkins_3-1700833124330.png

     

    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.

    grantjenkins_5-1700833295729.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard