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

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,323 Super User 2025 Season 2 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,143 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

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard