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 / Adding a column to a d...
Power Automate
Answered

Adding a column to a data table

(0) ShareShare
ReportReport
Posted on by 5

Hi all,

In Power Automate Desktop I have a flow where a data table is created. Data for this table is extracted from a webpage, and the table ends up with Column A and Column B, each containing several rows.

Now, I need to add a third column (Column C) where I want to insert the same number for every row. The number is stored in one of my current flow variables. This number will be identical across all rows.

What is the best way to achieve this?

I have the same question (0)
  • Verified answer
    eetuRobo Profile Picture
    4,484 Super User 2026 Season 1 on at
    You can use "Insert column into data table" -action to create new column and then add the value to each row by using a loop and "Update data table item"



    Or you could use .NET Script


    This is how the Run .NET script looks like:

     
    MyDataTable.Columns.Add("Column C", typeof(string));
    foreach (DataRow row in MyDataTable.Rows)
    {
        row["Column C"] = MyConstant;
    }
    
     
  • MW-24101252-0 Profile Picture
    5 on at
    Thank you @eetuRobo, I used the .Net-approach - and it works. 

    However, when I try to merge the datatable - with the now 3 columns - into another datatable, let's call it NEWdatatable also consisting of three columns, I now get the error "Warning: Deferred type provided and the data is not transferred to NEWdatatable, only the rows for each data line is created.

    This was not the issue when I only had column A and B - . Do you have any idea to why that is?
  • Suggested answer
    eetuRobo Profile Picture
    4,484 Super User 2026 Season 1 on at
    Good to hear it works.

    About the merge issue I think its just a warning you get when using Power Fx enabled flow with dynamic variable. I've noticed that it gives very easily "Deferred type provided" -warning. Its not an error but a warning and so it doesn't really mean anything is broken or faulty in the flow. 

    https://learn.microsoft.com/en-us/power-automate/desktop-flows/power-fx 

    If you recreate the flow with Power Fx not enabled the warning should not appear at all.
    If you want to use Power Fx then I would just do the regular For each loop so the first method I gave. That way you shouldn't get the warning and its easier to debug in the low-code actions than with the script. And since both methods are still doing a for each loop the same as long as you run the flow without the editor being open. 

    To the problem itself can you show screenshots of your flow and how the datatable looks after the merge? For me it works as expected even in the Power Fx enabled flow:
    DataTableSecond which I will merge into DataTable




    Now if you want to have the Column C to have the same value as you had before then either add another loop and update the value for all those rows that has empty value in the Column C. Or if its okay for to do the datatable merge before you add the new column then do that first so you only need to do the loop once when adding the new column with that default value.

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

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard