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 Apps / Powerapps: Display a m...
Power Apps
Answered

Powerapps: Display a multidimensional array within an email created within the flow

(0) ShareShare
ReportReport
Posted on by 38

Hi all,

I need to produce an output similar to this;

CNumber CTitle CAP

C123         Test    AB

If by iterating through the result list of a list rows-action an additional record should be added to the array and then displayed as described below. 

 

CNumber CTitle CAP

C123         Test    AB

C456         Test1   CD

 

If I intialize an array like this 

CPro2_1-1678359208467.png

The HTML table 2 returns an output as follows:

CNumber CTitle CAP

C123         Test    AB

 

If a now try to add the line C456 Test2 CD to the array by using append to array using the same structure as in Initialize I get an error that only float, string and so on types can be appended.

If I compose two identically initalized arrays the create html doesn't work with the automatic setting. That is, I have to name the columns and assign values.

 

If I try to solve the problem by initializing two arrays and compose them  

CPro2_2-1678359786014.png

the result is an array of two arrays [["C456","Test2","XY"],["C789","Test3","CD"]].

CPro2_3-1678360060492.png

Create HTML table doesn't work with automatic but needs values assigned. As the number of rows returned by the list rows - actions varies I can't use indexes. (can't use row count of list rows action as not all results are to be displayed)

 

Is there a way to solve this problem just using powerapps?

 

Thanks for any advice!

 

 

 

Categories:
I have the same question (0)
  • MSGW Profile Picture
    18 on at

    Hi @CPro2,
    it should work if you initialize the Array without the Object.

     

    by creating a foreach action that is iterating on the outputs of the "List Row" Action you can wirte the elements into the Array by just using "items('for_each')"

     

     

     

     

     

  • Cpro Profile Picture
    38 on at

    Hi @MSGW ,

     

    if I create the array without objects then the create html doesn't get the structure and asks me from the very beginning to name the columns.

    How do I get the values from within the array into the html-table? Values to the resultarray are added in each loop. At the end the result contained in the resultarray has to be send by mail created in the flow (outputs of create html). I don't have an idea how I can the values of the resultarray ie [["C123","Test1","AB"],["C456","Test2","CD"] ...["C890","Testx","ZZ"]] into the HTML-table each array within the resultarray being a now row in the HTML-table.

     

    Not the building up of the resultarray is the problem, but how to get it into the email body in form of a table. (which actually should be possible by entering outputs (of create HTML) into the email body.

     

     

     

    Input: { "CNumber":"C123", "CTitle":"Test", "CAP":"AB", } leads to error when used in initialize variable.

  • MSGW Profile Picture
    18 on at

    Hi @CPro2 ,

     

    We miss understood each other,

    here is a screenshot of what i meant what you should do to get what you need.

     

    MSGW_0-1678368636027.png

    1. initilize an empty array,

    2. get rows.

    3. iterate over them and append to Array

    4. create the HTML TAble

     

    i do this with Power BI tables aswell

     

    Outputs:

    MSGW_1-1678368964753.png

     

    You Initialized the Array as an Array of type Object,

    then you try to append an Arry of type Array wich is of type Object to it. 

     

  • Cpro Profile Picture
    38 on at

    Hi @MSGW ,

     

    you describe more or less what I also try to do.

    CPro2_0-1678369483963.png

    CPro2_1-1678369574175.png

    CPro2_3-1678369733689.png

     

    When I Call Create HTML-table thereafter I get asked to name the columns and enter the value.

    CPro2_4-1678369813984.png

     

    Apparantly, your append to array must look different. Somehow I lost the track. It doesn't make any difference if a create the html table using ArrayOfCases or outputs of compose.

     

     

     

  • Verified answer
    MSGW Profile Picture
    18 on at

    Hi @CPro2 ,

     

    you are so close to getting what you need :D.

     

    In the Appen to Array Action:

    MSGW_0-1678370870064.png

    Note: The Coloum names will be TestVal1, TestVal2, TestVal3 in my case

     

    Outputs:

    MSGW_1-1678370978550.png

     

    I hope i could help you. 
    Have a nice Day!

  • Cpro Profile Picture
    38 on at

    @MSGW 

    Thank you very much for your help. It works perfectly.

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 Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard