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 / Retrive cell value fro...
Power Automate
Unanswered

Retrive cell value from For Each Loop

(0) ShareShare
ReportReport
Posted on by 119

Table name: excelData

CodeStatus
123 
434 
343 

 

I have a "For each" loop with "excelData" as input. For the first iteration I should be able to access the cell: "123". How can i accomplish that? I have used the following code without any luck.

 

%CurrentItem[1][0]%

 

I have the same question (0)
  • Verified answer
    fraenK Profile Picture
    2,125 on at

    If you loop through a data table, then CurrentItem represents a data row. So there are only columns you can access.

    %CurrentItem[0]% for the first column value

    https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-data-types#advanced-data-types

  • dahlgebra Profile Picture
    119 on at

    Hi, 

     

    Thanks for a quick reply. I realized the fact that you only deal with one row when you do a loop right after posting the message. So for the current example you can access the mentioned value with on of these lines, Right?

     

    - %CurrentItem['Code']%

    %CurrentItem[0]%

  • fraenK Profile Picture
    2,125 on at

    Don't think that CurrentItem will hold the name of the columns, so if you want to access the column values by name then you need to loop through the table using the row index %ExcelData[0]['Code']% instead of for each.

    https://docs.microsoft.com/en-us/previous-versions/troubleshoot/winautomation/process-development-tips/variables/how-to-retrieve-list-item-datatable-cell

     

  • dahlgebra Profile Picture
    119 on at

    I think they will hold the name of the columns 🙂

  • fraenK Profile Picture
    2,125 on at

    You're right, the column headers are carried over

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