Skip to main content

Notifications

Community site session details

Community site session details

Session Id : j/ENAqQNpZ1mv0AN7o0Y0D
Power Automate - Building Flows
Suggested answer

How to get Value from array using First, not whole first row / record

Like (0) ShareShare
ReportReport
Posted on 18 Nov 2024 04:13:28 by 32
 
Hi there, 
 
I am using Compose with First() expression, to try and get the first Value from a Select Array. It returns the whole row / object (not sure what the right terminology is sorry), however I am trying to get the value itself. 
 
It is returning { "Licenses" : "Finance"}, whereas I am trying just to return "Finance". 
 
 
 
I feel like I need to add more to the First expression but cannot find the right syntax. Can anyone help me with how to access the value itself? 
 
Current First expression: 
 
first(body('Select'))
 
Whole Flow included below for reference
 
Flow
 
  
 
Flow Details
 
 
 
 
 
 
 
  • RubySmith11 Profile Picture
    32 on 19 Nov 2024 at 03:31:49
    How to get Value from array using First, not whole first row / record
    Hi @Jalpa, 
     
    Thanks for your replies and help. 
     
    I am trying to get the Compose to provide the output of "Finance". 
     
    For your second suggestion, in your screenshot the output still has  { "Licenses" : "Finance"}, whereas what I am trying to extract is only the "Finance". 
     
    Is there a way to do that? 
     
    I then need to concatenate it with another field later, so cannot have the whole value of { "License" : "Finance" }
     
    When I try the first suggestion: first(variables('Array1'))?['Licence']
    my compose input and output is blank. 
     
     
    Thanks in advance for your help!
     
     
  • Jalpa Mahesh Dhola Profile Picture
    35 on 18 Nov 2024 at 06:52:08
    How to get Value from array using First, not whole first row / record
    Yes,  you can use select action also like this
     
     
    Which will give the output like
     
  • RubySmith11 Profile Picture
    32 on 18 Nov 2024 at 06:21:03
    How to get Value from array using First, not whole first row / record
    Hi @Jalpa Mahesh Dhola, 
     
    Thanks for your reply.
     
    Is there a way to apply the expression to the Body of Select Action? Or can it only be used against an Array Variable, so I need to Append Array for each value in the Select first into a whole new 3rd array? 
     
    Thanks,
    Ruby
  • Suggested answer
    Jalpa Mahesh Dhola Profile Picture
    35 on 18 Nov 2024 at 05:35:10
    How to get Value from array using First, not whole first row / record
    You need to change the expression like 
     
    first(variables('Array1'))?['Licence']

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 105

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 84 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 62 Super User 2025 Season 1

Overall leaderboard