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 / Add a row into a table...
Power Automate
Suggested Answer

Add a row into a table - Value error

(0) ShareShare
ReportReport
Posted on by 244
I am trying to export SharePoint list data to an Excel .xlsx file on a daily basis. The flow works until the last step - Apply to each - "Add a row into a table." I have confirmed it is pulling a value in for every field, but it just isn't writing the values to the Excel file. I don't know how else to troubleshoot based on the error I'm receiving: "A value must be provided for item." Has anyone successfully fixed this?
 

 
 
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    14,485 Super User 2026 Season 1 on at
    Based on the error message, one of the values you are trying to populate when adding a row does not contain any value. You can do one of two things:
    1. Since it appears that the data is coming from SharePoint, update your SharePoint list so the fields are required.
    2. If this is not possible, use a coalesce expression on the values, which will handle the blank values and prevent you from getting this error. You can learn how to use coalesce at Blank, Coalesce, IsBlank, and IsEmpty functions - Power Platform | Microsoft Learn and Power Automate Functions: Coalesce (Handle Null Values from Objects) - FlowJoe.io

    If you are sure every single one of the 1,205 rows you are adding has data in all of the fields, it could be the people field causing the issue. While SharePoint will maintain data of the people who are entered in a people field, if they leave your company and their account has been disabled, this will cause errors. I am not positive, but I think coalesce will hand that situation. I know I have used coalesce on people fields when they're blank to provide an alternate e-mail address, so the flow continues.
  • Suggested answer
    Pstork1 Profile Picture
    69,397 Most Valuable Professional on at
    I think the row should be a record with a keyword of item: and then a record containing the different values.  Something like this
     
    {item: {"Employee Name": value, "Team Name": value, etc.}}

    ----------------------------------------------------------------------------------
    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
     
  • axray Profile Picture
    244 on at
    This is what one of the ID#s has in the INPUTS parameters box after the flow fails - I have each value expression written so that something will be returned, even if blank/null (either "N/A" or "0" (zero) - depending on the field type). I don't think it is the employee name field causing the issue, since these are all employees logging their time within the past week, so pretty unlikely they are no longer in the system a week later...
     
    Examples of the expression "if" statements I have in there: 
     
    1) 
    if(empty(item()?['Deliverables0/Value']), 'N/A', item()?['Deliverables0/Value'])
     
    2) 
    if(empty(triggerBody()?['OData__x0025__x0020_Completed']), '0', item()?['OData__x0025__x0020_Completed'])
     
    They seem to be working as I have them written... but I'm obviously missing something?
     
    {
      "source": "https://azureadminprod.sharepoint.com/teams/Business",
      "drive": "b!E3Ki64UyG0qVXw2JzAeZV44MxUUHZnhOslAdes_j4g5PnylZSMb4R6K",
      "file": "%252fShared%2bDocuments%252fBT_01242025.xlsx",
      "table": "DRTable",
      "item": {
        "Employee Name": "P, S",
        "Team Name": "In",
        "Report Date": "2025-01-13",
        "Item ID": "Non-Assignment Work",
        "Item Name": "Non-Assignment Work",
        "Tasks": "OOO",
        "Total Hours": "8",
        "Deliverables": "N/A",
        "% Completed": "0",
        "# Requirements to Review": "0",
        "# Requirements Passed": "0",
        "# Requirements Failed": "0",
        "# Test Cases To Review": "0",
        "# Test Cases Peer Review-Pass": "0",
        "# Test Cases Peer Review-Fail": "0",
        "# Requirements Expected To Create": "0",
        "# Requirements Documented": "0",
        "# Cases Created": "0",
        "# Cases Passed": "0",
        "# Cases Failed": "0",
        "Total Cases Executed": "0",
        "# PIV Claims Passed": "0",
        "# PIV Claims Failed": "0",
        "# Automation Cases Executed": "0",
        "Comments": "Planned Leave",
        "Defect Log Completed": "false",
        "Defect Log ID": "0",
        "Item ID:Developer Name": "N/A",
        "Item ID:Development Area": "N/A",
        "Modified": "2025-01-10T12:54:21Z",
        "Modified By": "S P",
        "Created": "2025-01-10T12:54:21Z",
        "Created By": "S P",
        "ID": 4037,
        "Employee Name:Employee Name": "P, S",
        "Employee Name:ID": "16"
      }
    }
     
  • David_MA Profile Picture
    14,485 Super User 2026 Season 1 on at
    Everything looks correct from what I can see. I would try to run it on one row by limiting your get items action to just return 1 item. See if it still errors. If it doesn't, expand it to a few more records and see if it fails then cycle through the apply to each action until you get to the item that failed and compare one that succeeded and failed. One other thing you can do is to set the action that runs after the add a row into a table action fails, is to set it so it runs whether the add a row action succeeds or fails.
     
    Your flow looks like you are trying to do what is shown in this video: https://youtu.be/RB_ySjhm9Sg?si=SayY8eTQzUZkursZ. I've done this a number of times this way and it works. Your flow looks slightly different than the process shown in the video. Maybe go through this video and you'll spot something.
     
    Good luck!

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard