Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Send an HTTP Request to Sharepoint Columns to Rows

(0) ShareShare
ReportReport
Posted on by 55

Hello!

I am trying to create an HTML Table that uses several columns from a Sharepoint and turns them into multiple rows. 

Example:

In Sharepoint: 

Column 1Column 2Column 3Column 4
TotalTotalTotalTotal

 

In HTML Table

Column 1Total
Column 2Total
Column 3Total
Column 4Total

 

Is there a way to do this? I am using the Send an HTTP Request to Sharepoint function in order to get the totals from a view. In theory, I would actually like to be using "count if" so that it looks like this in an HTML Table with 3 columns and multiple rows. 

 YesNo
Column 1TotalTotal
Column 2TotalTotal
Column 3TotalTotal
Column 4TotalTotal

 

Thanks!

  • dsopshin Profile Picture
    dsopshin 55 on at
    Re: Send an HTTP Request to Sharepoint Columns to Rows

    @FLMike I am currently getting a response that looks like this:

    {"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":1,"Value":"No"} {"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"Yes"}

    NoYes

     

    Is there something I should be doing to get totals? Also, once I try to add a 3rd category, the test fails when I run it. I feel like it's getting closer, but there must be a step that I'm missing. 

     

    Thanks!

  • dsopshin Profile Picture
    dsopshin 55 on at
    Re: Send an HTTP Request to Sharepoint Columns to Rows

    @RobElliott Do you think your initial suggestion will work with what I am trying to do? Or is there a better way to do it? Thanks!

  • FLMike Profile Picture
    FLMike 30,517 on at
    Re: Send an HTTP Request to Sharepoint Columns to Rows

    @RobElliott 

     

    I didn't think @dsopshin was using it right now (and seems his response agrees), but yes I definitely get that and you are correct if he was.

     

     

  • dsopshin Profile Picture
    dsopshin 55 on at
    Re: Send an HTTP Request to Sharepoint Columns to Rows

    I think the idea would be to use a calculated column, though I'm open to doing it other ways. I would need to find a way to get the total of the "yes" and the "no" responses in the column. Is that possible?

  • RobElliott Profile Picture
    RobElliott 9,997 on at
    Re: Send an HTTP Request to Sharepoint Columns to Rows

    @FLMike I suspect the reason the poster is not using the get items is that the total is a calculated column which you can't use in a filter query.

  • FLMike Profile Picture
    FLMike 30,517 on at
    Re: Send an HTTP Request to Sharepoint Columns to Rows

    Hi @dsopshin 

     

    May I ask why you aren't using the Get Items action to get the rows?

     

    But this is how you would do it

     

    1. Create a view with just those columns (not understand this doesn't solve our problem perfectly yet)

    2. Use Get items (SharePoint Action) with a Filter Query, to get the rows you want (or later on we can use a Filter Action)

    OPTIONS

    Option 1

    3A Assuming that you go ONLY the rows you wanted from SharePoint, we need to do 2 more steps.

    --Add a Select Action and configure the Key/Value pairs to ONLY be the columns you wanted (the reason for this is, even with a view, you still get back system columns you do not want in your table

    --Add a Create HTML Table Action, and add the Output from your above Select to the Input of the Create HTML Table action and BINGO you are done 🙂

     

    Option 2

    3B Assuming you got MORE rows than you intended, because you were NOT able to write a Filter Query

    --Add a Filter Action

    ----In the filter action, you would need to use the Dynamic Content "value" property of the Step 2 Get Items as your input

    ----Then in the Mappings, you would want to click the Advanced button and write a Filter Expression, which would limit your rows based on email address but this time it would look like this

    ------

    equals([Email Address],ValueFromStep2)

    And this would make your rows be only the ones that match your email address

    ----Add a Select

    -----Again we want to Select ONLY the rows you want, but this time its from the Filter Action, not the Get Items action

    --------We need to Add the Keys and Values (but I need to know which ones you need to show you)

    ---Add a Create HTML Table and again put the Select as the input

     

    And done


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard

Featured topics