cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DWTKBrook
Helper V
Helper V

Get data from array variable

Hello all,

 

I have 2 lists one with a flow attached called GiftRegistry, in that flow I have a get items that looks up another list called Division Manager that has 2 columns, DivisionManager and DivisionName, My goal is to select the item with the value of the DivisionManager, filtered by DivisionName which I compare it to a column in the GiftRegistry also called DivisionName, both columns are choices and the choices are identical. Below is my configuration;

DWTKBrook_2-1671723122394.png

 

This is working fine, The output is as below;

{
  "DivisionName": {
    "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    "Id": 5,
    "Value": "Private Equity"
  },
  "DivisionManager": {
    "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    "Claims": "i:0#.f|membership|derek.LAST@Tenant.com",
    "DisplayName": "LAST, Derek",
    "Email": "derek.LAST@Tenant.com",
    "Picture": "https://TENANT.sharepoint.com/sites/teams/GBERegister/_layouts/15/UserPhoto.aspx?Size=L&AccountName=derek.LAST@Tenant.com",
    "Department": "Technology Services",
    "JobTitle": "Senior Analyst"
  }
}

the output is the correct information, now I  need to get the DisplayName from the array to use in a send email action so I created a string variable configure as

DWTKBrook_0-1671722613417.png

But the value ends up being

{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser","Claims":"i:0#.f|membership|derek.LAST@Tenant.com","DisplayName":"LAST, Derek","Email":"derek.LAST@Tenant","Picture":"https://Tenant.sharepoint.com/sites/teams/GBERegister/_layouts/15/UserPhoto.aspx?Size=L&AccountName=...","Department":"Technology Services","JobTitle":"Senior Analyst"}

 

 

How can I just get the display name property value? or is there any easier way to do this. 

I appreciate any help you can provide.

 

Thank you

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @DWTKBrook,

 

Apologies, I assumed your original expression already worked.

 

In that case try this (after having a proper look at your screenshots 😂)

first(variables('DivisionManagerName'))['DivisionManager/DisplayName']


Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


View solution in original post

5 REPLIES 5
Expiscornovus
Super User
Super User

Hi @DWTKBrook,

 

Can you try to change DivisionManager to DivisionManager/DisplayName?

 

In your existing expression that would be like the below:

first('DivisionManagerName')[0]['DivisionManager/DisplayName']

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Hello @Expiscornovus ,

 

I attempted your suggestion but it seems to have triggered an error;

DWTKBrook_0-1671725691500.png

Here is how I configured the variable;

DWTKBrook_1-1671725740012.png

Is this correct?

 

Cheers!

VictorIvanidze
Community Champion
Community Champion

Try this:

first('DivisonManagerName')?['DivisonManager']?['DisplayName']

 

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.
Expiscornovus
Super User
Super User

Hi @DWTKBrook,

 

Apologies, I assumed your original expression already worked.

 

In that case try this (after having a proper look at your screenshots 😂)

first(variables('DivisionManagerName'))['DivisionManager/DisplayName']


Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Awesome, Thank you. That worked perfectly!

 

Thank you,

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,305)