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 Automate / Avoiding apply to each...
Power Automate
Unanswered

Avoiding apply to each loops with first() function

(0) ShareShare
ReportReport
Posted on by 76

Hi,

 

I am trying to filter out the weight of certain products using a oData connector, I want to use the 'quantity' of this weight as input for a variable. I can target the specific quantity i need but Power automate automatically makes an 'Apply to each' loop. I want to avoid this so i use the 'first()' function, right now the expression in my 'Compose' is: 

 
first(outputs('Get_Weight')?['body/value'])
 

This works, but i don't get the output i need, it gives ' "quantity" : 7.5' as output,   but i need '7.5' as output so i can use it as a double and calculate with it

45f792c0-2792-4780-909a-dfe525dc79d9.png

 

e8a2c764-9584-4d2f-aab6-3b4103f2beb5.png

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @Kryptic ,

     

    Please try:

    first(outputs('Get_Weight')?['body/value'])['quantity']

     

    Best Regards,

    Bof

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard