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 / loop table and extract...
Power Automate
Answered

loop table and extract value

(1) ShareShare
ReportReport
Posted on by 321
I have a table I'm looping through and want to extract values in specific columns, then write them to an excel worksheet. 

the table I'm looping looks like this;


currentitem2 looks like this 


I have tried using the code 
%CurrentItem2[3]%
to reference the 3rd column in current item which should be 'OPENING BALANCE'. 
but it just writes '%CurrentItem2[3]%' in my excel sheet.

what am I doing wrong?

 
 
 
thank you  
I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    16,048 Super User 2026 Season 1 on at
    Hi there!
     
    Try %CurrentItem2[2]% because if I remember correctly, this is 0 based and should be [2].
     

    ------------------------------------------------

     

     

    ⭐ If this was helpful, please like and check the box below "Does this answer your question" to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

  • Verified answer
    eetuRobo Profile Picture
    4,484 Super User 2026 Season 1 on at
    You are mixing up Power Fx and regular flow syntax. Since it seems like you created a flow with Power Fx turned on then you can't use %CurrentItem2[3]% -syntax but the syntax is =CurrentItem2.Narrative

    If you decide to recreate the flow without Power Fx enabled then @'s solution would be correct. In the regular PAD flow the index starts from 0 so the third index is 2. But in Power Fx the indexing starts from 1 so the third index is 3. But in Power Fx you can use the dot column name. Or if you don't know the column name you can use ReadCell() -function like this: 
    =ReadCell(CurrentItem2,3)
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,048 Super User 2026 Season 1 on at
    Hi,
     

    Solution: Use Datarow Column Access Syntax

    Instead of %CurrentItem2[3]%, you need to use one of these methods:

    Method 1: Access by Column Index (Recommended)

    %CurrentItem2[3]%
     

    Wait, if that's not working, try:

     

    Method 2: Access by Column Name

    %CurrentItem2['Narrative']%
     

    Method 3: Use Column Reference

    %CurrentItem2.Narrative%
     

    Step-by-Step Fix:

    1. Check your variable syntax - Make sure you're using the correct variable reference format in the "Value to write" field.

    2. Try this specific syntax for the 3rd column (Narrative):
      %CurrentItem2.Narrative%

    3. Or try accessing by column name:
      %CurrentItem2['Narrative']%

    4. If you want to access by index, the correct syntax should be:
      %CurrentItem2(2)%
      (Note: Using parentheses instead of brackets, and remember indexing starts from 0)
    or your specific case where you want the "Narrative" column:

    1. In the "Value to write" field, enter:
      %CurrentItem2.Narrative%

    2. For other columns, you would use:

      • Posting Date: %CurrentItem2['Posting Date']%

      • Value Date: %CurrentItem2['Value Date']%

      • Debit Amount: %CurrentItem2['Debit Amount']%
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard