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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Referencing part of an...
Power Automate
Answered

Referencing part of an array by element name

(0) ShareShare
ReportReport
Posted on by 200

Hi, 

 

I have an array :

 

[
  {
    "ExcelColumnName""First Name",
    "MatchingEmployeeColumnName""Forenames"
  },
  {
    "ExcelColumnName""Surname",
    "MatchingEmployeeColumnName""Surname"
  },
  {
    "ExcelColumnName""National Insurance Number",
    "MatchingEmployeeColumnName""NINumber"
  }
]
 
i want to be able to reference one of the rows in the array by using the "MatchingEmployeeColumnName" column, to get the "ExcelColumnName" column 
 
example : i want to get the "ExcelColumnName" for the element that contains "NINumber" ..
 
is this possible in Power Automate?
 
 
Categories:
I have the same question (0)
  • Verified answer
    tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @DragonLord ,

    you can't reference it directly, but you can use the 'Filter array' action to filter only the entry where MatchingEmp... equals a specific NINumber. The output of the 'Filter array' will be a single object where you can extract the NINNumber using an expression, that might look like this:

    first(body('Filter_array'))?['ExcelColumnName']

    image.png

  • DragonLord Profile Picture
    200 on at

    i did try filter. it works. i was hoping for something more dynamic as i would need to identify 88 fields. thats a lot of filters .. lol

  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    If you could change the input data format to have all the information as a single object, it would be much easier, you'd just access the specific values:

    {
     "First Name": "Forenames"
     "Surname": "Surname"
     "National Insurance Number": "NINumber"
    }
    
    <the object>?['First name']
    <the object>?['Surname']
    <the object>?['National Insurance Number']

     But if it must be an array where each property will be a separate object then I have to agree, it'll be a lot of filters.

  • DragonLord Profile Picture
    200 on at

    tried that , no success :

    The template language expression 'variables('excelTUPEFieldList')?['Surname']' cannot be evaluated because property 'Surname' cannot be selected. Property selection is not supported on values of type 'String'.

     

    {
    "First Name": "john",
    "Surname": "doe",
    "National Insurance Number": "1234"
    }

  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Did you define that the variable is of type Object? Wasn't it initialised as a string?

  • DragonLord Profile Picture
    200 on at

    i changed from a variable to a Compose , and i could reference it.

    Just need to create the string object now from the table that returns the rows.

  • Verified answer
    tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    image.png

  • DragonLord Profile Picture
    200 on at

    yes, this worked well for me.
    learned something new today.

     

    "dÄ›kuji a na zdraví" 🙂

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 997

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 642

Last 30 days Overall leaderboard