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 / looping data table usi...
Power Automate
Answered

looping data table using for each

(1) ShareShare
ReportReport
Posted on by 40

I am looping through the data table and writing the current item to text file. but it is not writing actual text, instead "System.Data.DataRow" as shown in the screenshot below. How can i convert for loop "currentitem" to the actual value?

When I use display message it is showing actual value.

Please advise.

 

 

mitsurya_0-1680634996239.png

 

mitsurya_2-1680635116307.png

 

Thanks,

Surya.

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    So, a CurrentItem for a Datatable is an entire data row.  I assume you want a single text value from that datarow.

     

    The format for a single text of a column from the CurrentItem datarow would be %CurrentItem[ColumnName]%.

     

    More information on this formatting can be found here:

     

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

     

    Best of luck!

  • MaiPhuocHoang Profile Picture
    on at

    Hi sir,

    So the syntax to get a single text of a column is %CurrentItem[ColumnName]%.

     

    I wachted many videos and all used that syntax. But I don't now why I can not use it on my power automate. When I try the flow, it put the value "%CurrentItem[ColumnName]%" on the place.

     

    When I place variant %CurrentItem['Ngay in HD']% for exp on the flow, It will show that the value is '="%CurrentItem['Ngay in HD']%"'.

     

    Can you help me with this?

  • MarcDussault Profile Picture
    12 on at

    Have you resolved this issue? I am running into a similar problem.

  • Nazmashaik Profile Picture
    4 on at

    Hello,

     

    In the latest version of Power Automate, Power Fx is enables. Hence %CurrentItem[ColumnName]% expression is not giving the expected output. 

    Instead, you can use functions to retrieve the value of a column. Here is the syntax "=ReadCell(CurrentItem, ColumnIndex)". The column indexes start from 1, 2, 3, 4 etc.

     

    For example, to get the value of first column in the currentItem inside a for each loop : =ReadCell(CurrentItem, 1)

    Nazmashaik_0-1715634208870.png

     

    Nazmashaik_2-1715634617437.png

     

    Hope this resolve your issue!

  • Nazmashaik Profile Picture
    4 on at

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

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 227 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 213 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 151

Last 30 days Overall leaderboard