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 / for each item in datat...
Power Automate
Unanswered

for each item in datatable

(0) ShareShare
ReportReport
Posted on by 2

Hi all,

 

In the flow, I use the following actions: 1. Attach to an executing Excel file. 2. Read the entire worksheet and save it in a variable of type ‘DataTable’. 3. Use the ‘For Each’ action on the DataTable to perform specific actions. Namely: 3.1. Execute a VBScript to change the value of specific cells in the table. 3.2. Attempt to capture the already changed value in a variable with the condition ‘item["column name"]’, but it doesn’t capture the correct value. Why?”

I have the same question (0)
  • eetuRobo Profile Picture
    4,572 Super User 2026 Season 1 on at

    Can you show a screenshot of your flow? 
    What value does it give then? Does it give any value or an error?

  • Srini007 Profile Picture
    3,490 Super User 2026 Season 1 on at

    Hi @Rusinov 

     

    It should be your item['column name']

     

    Just replace your double quotes to single quotes

     

    Check below for your reference

     

    Srini007_0-1716193928509.png

     

     

    If you find this reply helpful, please consider giving it a LIKE AND

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION

     

    Cheers,

    Srini

  • Rusinov Profile Picture
    2 on at

    input file 

    Rusinov_0-1716193477731.png

    my flow

    Rusinov_2-1716193806392.png

     

    output file after run vbs script 

    Rusinov_3-1716193871291.png

    variable in power automate 

    Rusinov_4-1716193913821.png

     

     

     

  • eetuRobo Profile Picture
    4,572 Super User 2026 Season 1 on at

    Problem is that your loop is using the old datatable. You need to read the excel again to get the updated status.
    Your For each is using the Step 2read from excel which has data that was not updated. The VBScript updates the Excel directly and not your dtQueue variable that is used in For each and then in the set variable Item['Status'].

    So either read the excel again in the for each loop or use WScript.Echo and then refer to the VBScriptOutput when setting the status variable.

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @Rusinov 

     

     I agree with @eetuRobo thoughts.

     

    But could you please share vbscript screenshot to investigate further on this issue?


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 190

Last 30 days Overall leaderboard