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

Add a row into table - asking for 'Body'

(0) ShareShare
ReportReport
Posted on by 68

I'm trying to get rows from an excel table and add relevant rows to different files saved on SharePoint. I've got most steps working but 'Add a row into table' doesn't seem to be functioning as I expect, or as any tutorials show. 

Back2Basics_0-1687861555110.png

I'm expecting to see a list of columns where I can assign data from 'Get a row' - but I don't see this. There are no options when I click on 'add new parameter' either. I don't get anything from 'Get a row' from dynamic content, it's not even listed - is there something I can add in manually? I just don't know what I need to add in. 

TIA

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @Back2Basics ,

     

    It should be a JSON string, something like:

     

    {"ColumnName1":"Value1","ColumnName2":"Value2"}

     

    Best Regards,

    Bof

  • Back2Basics Profile Picture
    68 on at

    Thanks @v-bofeng-msft 

     

    I tried that yesterday but no success. The column names in the table have spaces and I want to values to be dynamic. I have 'for each' that brings values through and need around 2,000 files to update based on this. 

     

    I was trying this Compose yesterday, but couldn't get it to work:

    {

    "ID": items('Get_a_row')?['ID'],
    "Site name": items('Get_a_row')?['site name'],
    "effective date": items('Get_a_row')?['effective date'],
    "surrender date": items('Get_a_row')?['surrender date']

    }

    How does one add dynamic text into a JSON

     

  • v-bofeng-msft Profile Picture
    on at

    Hi @Back2Basics ,

     

    Please try:

    {
    
    "ID": "@{items('For_each_row')?['ID']}",
    "Site name": "@{items('For_each_row')?['site name']}",
    "effective date": "@{items('For_each_row')?['effective date']}",
    "surrender date": "@{items('For_each_row')?['surrender date']}"
    
    }

     

    Best Regards,

    Bof

  • Back2Basics Profile Picture
    68 on at

    @v-bofeng-msft  Thanks for the quick reply. I've been trying this out but still can't get anyway - the script for the JSON looks right (the text turns into boxes when I paste it in, so that's a good sign) but having problems.

    I have a trigger (when file saved) > list rows in file (static file that sits there) > list rows (in new file) > 
    for each> 
    get row (from new file where key column matches that in static file)>
    I then put the compose in here, but it won't let me save it because it's referencing the 'get row' and not the 'for each'. Tried it referencing 'for each' and just get an output with each column having a blank field. 

    What I need to do is this, I have document sets on SharePoint for each ID (around 2,000). For each ID I need a 'history' which we're doing by creating an excel file (with table set up and column headers in place), the history is to be updating by incoming files - but we receive everything in one file (one row per ID). So I'm trying to add a row to each file in the ID document sets where there is a corresponding row on the incoming excel file. This is roughly what I'm doing:


    Receive file > Save file to SharePoint (these two steps are done in another flow for now that is live and working) > List rows on static file >  [for each static row] > Get row (from incoming file) > Check out (file saved in each document set) > Add a row to table (file saved in each document set) > Check in

    Hitting a few issues:
    > Can't check out document without file ID - resolved for now with file Id included in static excel file reference table
    > Can't add row to table directly from Get row - trying to do this with compose and creating JSON, but struggling with dynamic data feeding into it

  • Back2Basics Profile Picture
    68 on at

    @v-bofeng-msft so I've tried this but still don't get anywhere. It comes up with an error "The request entity's media type 'text/plain' is not supported for this resource.". 

    I've searched a few things but nothing tells me what I've done wrong here. The JSON output looks okay as far as I can see. 

    Whenever I search about 'Add a row into a table' nothing shows 'body' coming up. Everything I search shows the ability to pick a column and assign values to the column - but I don't get these options when creating this flow. 

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard