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 / update data table item...
Power Automate
Answered

update data table item action index error

(0) ShareShare
ReportReport
Posted on by 727 Super User 2025 Season 2
Hello,
 
I don't understand how to address the following error.  I am using the Update data table item action in PAD but receive item index out of range error.
There is only one row in the variable data table that is being updated. Power Fx is enabled.  See screen shots.
Do have the syntax, correct? 
Any suggestions?
 
 
 
 
Thanks!
I have the same question (0)
  • Pstork1 Profile Picture
    68,729 Most Valuable Professional on at
    The column you want to update is also supposed to be a 0 based index, not a column name.  Change the entry for Store to 8.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Cgangweg01 Profile Picture
    727 Super User 2025 Season 2 on at
     
    Thanks for the reply. Unfortunately, that did not work. I got the same error message.
    I didn't notice the instruction though it does say column name or index unlike the row.
    I suspect it is something to do with Power FX which I wish I didn't enable for this flow.
     
    Any ideas now?
     
  • Suggested answer
    Riyaz_riz11 Profile Picture
    3,893 Super User 2025 Season 2 on at
    Hi,
     
    1. Action: Update data table item

    2. Data table variable: MyDataTable

    3. Row index: 0 (zero-based)

    4. Column name or index: "Status" (use double quotes, exact case)

    5. Value to set: "Approved" (or %YourVariable% if dynamic)

     

    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

     

     
  • Verified answer
    Cgangweg01 Profile Picture
    727 Super User 2025 Season 2 on at
    @Riyaz_riz11 Thank you for the suggestion.
     
    I actually got this to work a bit differently, see screen shot. 
     
    First, I recreated the flow with Power Fx shut off. (There should be more disclaimers about how Power Fx works and the remaining issues)
     
    No quotes around the Column name.
     
    And I needed to include reference to the field name ['StoreNameText'] within the variable in New value because otherwise it was inserting a whole column into the field.
     
  • eetuRobo Profile Picture
    4,220 Super User 2025 Season 2 on at
     You are correct that the issue was with Power Fx and good that you found solution in recreating the flow with out Power Fx enabled.

    Power Fx is using 1-based indexing where the regular flow is using 0-based indexing.



    https://learn.microsoft.com/en-us/power-automate/desktop-flows/power-fx
  • Cgangweg01 Profile Picture
    727 Super User 2025 Season 2 on at
    Hello @eetuRobo
     
    Thanks for the info. I probably should have continued to use Power Fx to keep the learning coming.
     
    I had discovered the MS learn page, so I did try 1 based array indexing but was still getting an error related to range. With hindsight, that was probably due to the variable being entered as the New value.
     
    How would I have needed to write the Power Fx expression to get the result this provides without Power Fx?
     
    New value: %CurrentStore['StoreNameText']%
     
     
  • Suggested answer
    eetuRobo Profile Picture
    4,220 Super User 2025 Season 2 on at
    Hello,

    You could use dot notation. So when you are in a loop and have one data row variable (in your case CurrentStore) and the column is called "StoreNameText then the syntax would be =CurrentStore.StoreNameText





    Or if you don't want to loop a table but just update first rows you can use First() -function

    With Power Fx you can also access certain cell with =ReadCell() -function.
    =ReadCell(Row Index, Column Index) 

    So if third column would be the value I want to update the new value from:



    Or if you want just the first row alone then you don't need a loop but can just do =ReadCell(1, 3)

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard