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

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.

I have the same question (0)
  • 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

    Hi Marc,

     

    Please checkout below solution.

    Solved: Re: looping data table using for each - Power Platform Community (microsoft.com)

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