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 / Custom Columns in crea...
Power Automate
Unanswered

Custom Columns in create HTML table after array

(0) ShareShare
ReportReport
Posted on by 33

Hi, I have created a flow that builds an HTML table based on an array (following one the examples form the forum. WOrks perfectly except that I don't need to send all columns, only a few and even includes the ones used by PowerApps.

 

I tried the advanced options for custom columns but enable to make it fly. Adding screencapture for reference, in escence need to pick which columns to show so then I can send the "custom" table via emails.

 

Thanks in advance.


Fer

 

flowexample.PNG

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

    Hi fermoreno,

     

    According to the screenshot you provided, it seems that you are getting rows from an Excel. I create a simple flow to test this issue on my side.


    When creating the flow, I don’t get the message asking me to add a foreach.


    The flow is configured likes below. And it works fine on my side.

    3.PNG

     

    Please take this for a reference and try again with it.

     

    Best regards,
    Mabel Mao

  • fermoreno Profile Picture
    33 on at

    Hi Mabel, thanks for the reply. It kind of worked but did not achieve my goal. Perhaps I should explain...

     

    I have an excel table with details in each row, example:

    sample1.PNG

     

    Normally would send an email per row but is way to many for the same customer, so what I would like to do is an array based on a list which is dynamic (it is a list from a different table in the same file that I created via power query), not always the same customers with an output of a table but not including all columns (the one created by powerapps for example) like this:

    sample2.PNG

     

    Tried your example, it did work but is not grouping them... is sending an email per row. (Flow keeps adding apply to each all the time)

     

    The goal is to send a table with the selected columns to each customers via email.

     

    Perhaps I'm using the wrong apporach:sample3.PNG

    sample4.PNGsample3.PNG

     

    Thanks is advance

    Fer

     

  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi fermoreno,

     

    There are two Get rows actions in your flow. Are they getting rows from different tables? As you said that “it is a list from a different table in the same file that I created via power query”.


    There is a Consignee column in both the two lists, and you want to get columns when there is a common consignee in the two list, right?


    Best regards,
    Mabel Mao

  • fermoreno Profile Picture
    33 on at

    Exactly, 2 get rows, different tables and consignee matches I used the second table to identify or to set the array parameters.

     

    The second table has the list of customers and it is generated via power query everytime is refreshed.

     

    Appreciate the help.

     

    Regards

     

    Fer

  • fermoreno Profile Picture
    33 on at

    Hi, Just wanted to share that I managed to solve it (thanks to http://johnliu.net/ magnificent post) by manipulating the data via JSON  in with SELECT.

     

    Basically, was able to select the right properties I needed following this structure:

     

    {

    "Column_Name":"@item()?['Object_of_Array'];

    }

     

    The output is easily transformed to a HTML or CSV Table.

     

    Fer

  • DAGEM Profile Picture
    30 on at

    @fermoreno could you post your solution please? I am working on a similar flow where I need to go through a list, group the items that satisfy the condition (such as listing vans due for MOT in the next 30 days) and send a table of the van details.

  • fermoreno Profile Picture
    33 on at

    Will use fake data as you know... sensitive stuff. It's reading from a XLS with 2 tables but you could use other arrays like JSON. 

     

    I started with a file with 2 tables (one per sheet) with the info I need, the result will be a table for each customer in the second table. (4 Tables in total in this example).

     

    I developed this because I needed only some columns and not all from a larger data set (and not include the columns added by powerapps)

    XLS SamplesXLS Samples

     

    In this case, a manually triggered flow that Get Rows from each table.

    Import the 2 tablesImport the 2 tables

    Then starts the tricky part. Create a FILTER operation (do not add the apply to each, will be done automatically). in From you select the COLUMN (Customer in this case) from Data table to be equal to  COLUMN (Customer also) in Customer_list table), in advanced mode looks like this: (Flow will add the apply to each automatically since is an array of elements)

     

    @equals(item()?['Customer'], items('Apply_to_each')?['Customer'])

     

    Then you add a SELECT step where you will need to use from the Body of Filter Array Output, in Map suggest to add the column names that will be displayed in your CSV or HTML table and then click the advanced mode (highlight in yellow).

     

     

     

    Add filter to tablesAdd filter to tables

     

    Very important, you will have a JSON structure that you need to complete, for sake of the example (and being organized) the Property label (let's call them Columns) is the same as the want to fetch from the filtered data. This is not mandatory, you can put the label or Display name differently but the info to fetch needs to be the same as from the output of Filter (careful with spaces and special characters, makes it more tedious). So, for SKU label I want to fetch the data that was on the SKU column in my excel, (all of them, one by one) to be more clear with this example will be: "SKU":@item()?['SKU'], you continue until you are done with all, if you break the JSON structure it won't let you continue. I always do it in text/advanced mode.

     

    Select to Output - JSon StructureSelect to Output - JSon Structure

    Almost done, the output of SELECT needs to be added to step Create CSV table or HTML, as you wish to then easily incorporate to an email or whatever.

     

    Create CSVCreate CSV

    If we examinate the output of the Flow you will see with more details how the XLS table input is managed in Flow as JSON object and then manipulated.

     

    OutputOutput

    This a simple example, I have managed (after trying and trying over weeks) using this approach with more complex info (like JSON arrays and outputs from Web APIs) but it  is very similar.

     

    Let me know how it works, if you have trouble post your screenshoots to guide you directly.

     

    Cheers!

     

    Fernando M

     

  • DAGEM Profile Picture
    30 on at

    Thanks for the reply. The issue I have is I can't select the filtered array items for my Select Map. I don't know if this is because I used Get Items SharePoint (and not from a spreadhseet).

     

    Image1.JPG

     

    Image2.JPG

  • fermoreno Profile Picture
    33 on at

    Hi, never been able to be pulled from the Dynamic Content tab. Although you can retrieve them in with "text mode" in Select with the very same technique that I describe you:

     

    {

    @item()['column']

    }

     

    Please be aware that sharepoints uses a "code" instead of column name... suggest to run your flow to the point of Filter Array and check the output so you can see the JSON structure, below a screenshoot (sorry to mask stuff, but cannot share it fully).  

     

    You should be able to retreive what you need with Select and then to HTML.

     

    Hope it helps, if not share the JSON output of your sharepoint and will help you to create the text that you  need for Select.


    Fer

     

    sharepointjson.PNG

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have two arrays that I want to display in side by side rows of table but its coming into one big block of values in the html table. any suggestion ?

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 997

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 642

Last 30 days Overall leaderboard