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 / How to get just the "V...
Power Automate
Answered

How to get just the "Value" of the "Current Item" in an "Apply to each" Condition

(0) ShareShare
ReportReport
Posted on by 57

Hi All,

I'm trying to get just the "Value" property of the "Current Item" within my "Apply to Each" condition. The Current Item actually contains several properties including "@odata.type", ID and Value. I'm looking for the code to just get the value of the string because dynamic content doesn't provide it. items('Apply_to_each') is the present code and need to drill down and get just the "Value" property. image.png

Categories:
I have the same question (0)
  • RobElliott Profile Picture
    10,426 Super User 2026 Season 1 on at

    Hi @IT_Matt I'm not quite sure why you would have an apply to each on this as you have just created a single file and got the details of that file, so I don't know what the apply to each is doing there. Am I missing something here (probably!) ?

    Rob

    Los Gallardos


    copy_file.png

     

     

  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    Hi @IT_Matt 

     

    within apply to each

    use expression item() - this will give you context to currently running item in the loop

     

    so if Value is available withoin location loop

     

    use item()?['Value'] - this should be used as an expression

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

     

  • IT_Matt Profile Picture
    57 on at

    Hi Rob,

     

    The reason for the "Apply to Each" is because the "Location" is a SPO column that has multi-selections. I need to use each selection as the destination folder name (library name). 

    So to start at the beginning I have a user uploading a file to a library and they add metadata under the location column by selecting the locations the file needs to go to. I have Flow looking at the selections in that location column to see which libraries the file will need to be copied to.  

    Hope this helps. 

  • Borup Profile Picture
    2 on at

    If using Power Automate Desktop this is an other syntax.

     

    If using af SQL-execution step like this:

    SELECT COUNT(*) Cutomers FROM CUSTTABLE

     

    The you can set a variable step like this:

    Set (Customers) To: %QueryResult[0]['Customers']%

     

    You can also use a loop for this:

    For Each (CurrentItem) in (QueryResult)

    ... Set variable (Customers) to: %CurrentItem['Customers']%

    ... Break Loop

    End

     

    Happy coding with Power Automate Desktop https://aka.ms/GetStarted-PAD

     

  • Vishesh_vats Profile Picture
    17 on at

    Hi Reza,

    I'm new to this. I'm having a problem with my "apply to all " timing out. Attached are the screenshots.

    Any help would be appreciated.

    Variable.JPG

    Apply.JPG

     

    There are almost 2000 values in the IDs array, What I wish to do is, send the request where the URI has all the array values one by one as query parameter.  And eventually, create a file in onedrive for the output data. 

  • ClaireAllen Profile Picture
    762 on at

    Hello @RezaDorrani 
    I'm wondering if you could help me on the same issue
    I'm trying to get the current value for a SP List item from a Choice Column that has checkboxes and allows fill in choices
    This is what I currently get, repeating of all items on my email, nit what I would like is the current ID value for each item

    ClaireAllen_0-1686668674100.png

    This is my current workflow, this is after Get Items from a SP List

    ClaireAllen_1-1686668767570.png

    Any suggestions / help how to get current list item from the apply to each
    Thank you in advance
    Claire

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard