web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Extract Display names ...
Power Apps
Answered

Extract Display names for a selected item trigger

(0) ShareShare
ReportReport
Posted on by 86

Hello everyone,

 

In one of my lists there is a possibility to manually trigger the flow and it is realized through 'For a selected item' trigger. This trigger allows to choose custom approvers (see screenshot) but I also need approver names in further flow steps. My question is how I can get the display names if using this trigger?  I have already tried Get item but it is not picking the names. 

 

nikitamobile85_0-1637667979155.png

 

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    If you want to trigger it manually, why don't you create a Power App and set the trigger in the flow to be power app.

     

    Tehn, in the power app you create those fields and pass them to the flow.

     

     That would solve your problem...

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

  • nikitamobile85 Profile Picture
    86 on at

    Hi Nogueira1306,

     

    thanks for your prompt reply. I though about it but my users rely on the list to track approval status from multiple stakeholders. Having a Power app separate interface will lead to confusion. They will need to apply in one place and to track the status in a list. 

    That's why I wanted to make it as simple as possible giving an ability to initiate the flow straight from the list.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    You can have that list in a power app...

    You can also have antoher list with the user and his approvers. And, when you create an item in the first list, you get the approver from the second lsit and there you go.

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,
    Gonçalo Nogueira

    Check my LinkedIn!

    Check my User Group (pt-PT)!

    Last Post on Community

  • Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi @nikitamobile85 

     

    You can use the following approach in Power Automate:

    • Use compose adn the function 'createArray', to create an array of your separate emails
    • Create an Apply to each
    • Add Outputs from your compose as an input to your apply to each
    • Then use Get user profile (V2) inside your apply to each
    • In the User (UPN) field, Select the 'Current item' dynamic content (scroll to the bottom)

     

    AmDev_2-1637669838480.png

     

    This gives you the user profiles for all associated email addresses that you can use further in your flow.

     

    Hope this helps - Good luck!

     

  • nikitamobile85 Profile Picture
    86 on at

    Hi,

     

    Thank you! I think I was able to add the flow steps according to your advice. However it is not clear how can I get those display names now? When I start to type DisplayName in dynamic content only Get Item sources are diaplyed.   

     

    nikitamobile85_0-1637670683149.png

     

  • Gerard Simpson Profile Picture
    2,987 Moderator on at

    Cool - What do you want to do with the display names?

  • nikitamobile85 Profile Picture
    86 on at

    pls also see an error message 

    nikitamobile85_2-1637671516590.png

     

  • nikitamobile85 Profile Picture
    86 on at

    My flow automatically generates PDF form with the table containing approver names. Please see the screenshot for variable where I collect all the data and then transform it to HTML/PDF. I want to call Display names like shown on the screenshot. Previously I used Get item as a source. 

     

    nikitamobile85_0-1637671687166.png

     

     

  • Verified answer
    Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi @nikitamobile85 

     

    For the error, it looks like there is nothing inside your 'createArray()' function at the start? - for this expression, you need to add the inputs/dynamic content available from the trigger in between the function brackets i.e. createArray(email1, email2, email3 etc...) 

    AmDev_0-1637674689456.png

     

    Didn't mention this previously, but if you only want teh DisplayName, show advanced options adn insert DisplayName (as the only field you want back) - this refines your flow. See below:

    AmDev_1-1637674862005.png

     

    Now to get teh names how you want, you need to 1) initialise an Array variable, 2)append to that array variable inside the For Each Loop 3) reference the relevant Array variable item in your final step to get the respective displaynames

     

    1) Initialise an Array variable above your Apply to Each step

    AmDev_2-1637675034842.png

     

     

    2) Add an Append to variable step inside the Apply to each, pick the variable you have just initialised and add the DisplayName dynamic content

    AmDev_3-1637675111053.png

     

     

    3) in your final step where you want to add the display names into the variable, for each name that you need, just go to the relevant item in your final variable step, open up expressions, select the new array variable with the names from above from the available dynamic content and simply add '[0]' at the end to grab the first name, '[1]' at the end for the second name etc etc - See below an example of where I grab the first name in the array variable below

     

    AmDev_4-1637675431767.png

     

     

  • nikitamobile85 Profile Picture
    86 on at

    Thanks a lot for your support! Much appreciated! It works as expected but.. In case if not all of the 6 possible approvers are necessary it gives an error saying that array values can not be null. Please advise how it can be bypassed.

     

    Thank you in advance!

     

    The 'inputs.parameters' of workflow operation 'Get_user_profile_(V2)' of type 'OpenApiConnection' is not valid. Error details: The resolved string values for the following parameters are invalid, they may not be null or empty: 'id'

     

    nikitamobile85_0-1637681034093.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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard