cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

PowerApps: How to print/insert content of nested table in HTML?

I have a collection created using the following query in PowerApps:
ClearCollect(MyTable,ForAll(ToolsMasterVersion2,If(!('{Name}' exactin ABCTable.ToolNumber),{ToolNumber:'{Name}',ContactPerson:ContactPerson1})));

Then, I created grouped collection:

ClearCollect(groupedMyTable,GroupBy(MyTable,"ContactPerson","ToolNumber"));

How can I use groupedMyTable content such that for each "Contact Person" corresponding "ToolNumber" is inserted/printed in the following HTML code?

"<table width='100%'> " &
      "<tr>
          <td> Report Generated by: </td><td>" & User().FullName & "</td>" &
            "</tr>" &
      "<tr>
          <td> Date Generated: </td> <td>" & Today() & "</td>
      </tr>" &
 "</table> <br>" &

"<strong> Items: </strong>" &
 "<table width='100%' border='1' cellpadding='5' style='border:3px solid black; border-collapse:collapse'>" &
      "<tr style='background-color:red'>
          <th> Tool Name </th>
      </tr>
      <tr>" &
          Concat(Sort(MyTable,ToolNumber), "<td>" & ToolNumber & " " & ContactPerson & " </td><tr>" )&
 "</table>"

****************************************************************************************************************

The desired out put is:

Person *************************  ToolNumber

ABC                                           1234

                                                  4567

                                                  9876

xyz                                             6789

                                                   4432

                                                   7892

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: PowerApps: How to print/insert content of nested table in HTML?

Hi @Anonymous,

 

Do you want to insert the grouped collection into the HTML text control within your PowerApps app?

 

I have made a test on my side and I afraid that there is no way to achieve your needs in PowerApps app currently. There is no way to insert a grouped collection into a HTML text control within a PowerApps app currently. In addition, the HTML text control only supports inserting Text, Boolean and Number value currently.

 

Currently, we could only insert corresponding "TotalNumber" value for each "ContactPerson" into the HTML text control as below:7.JPG

The HtmlText property of the HTML text control set to following formula:

"<table width='100%'> " &
      "<tr>
          <td> Report Generated by: </td><td>" & User().FullName & "</td>" &
            "</tr>" &
      "<tr>
          <td> Date Generated: </td> <td>" & Today() & "</td>
      </tr>" &
 "</table> <br>" &

"<strong> Items: </strong>" &
 "<table width='100%' border='1' cellpadding='5' style='border:3px solid black; border-collapse:collapse'>" &
      "<tr style='background-color:red'>
        <td>ContactPerson</td>
        <td>ToolNumber</td>
      </tr>
      <tr>" &Concat(Sort(MyTable,ContactPerson), "<td>" & ContactPerson & "</td><td>" & ToolNumber & " </td><tr>" )&
 "</table>"

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

 

Best regards,

kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: PowerApps: How to print/insert content of nested table in HTML?

Hi @Anonymous,

 

Do you want to insert the grouped collection into the HTML text control within your PowerApps app?

 

I have made a test on my side and I afraid that there is no way to achieve your needs in PowerApps app currently. There is no way to insert a grouped collection into a HTML text control within a PowerApps app currently. In addition, the HTML text control only supports inserting Text, Boolean and Number value currently.

 

Currently, we could only insert corresponding "TotalNumber" value for each "ContactPerson" into the HTML text control as below:7.JPG

The HtmlText property of the HTML text control set to following formula:

"<table width='100%'> " &
      "<tr>
          <td> Report Generated by: </td><td>" & User().FullName & "</td>" &
            "</tr>" &
      "<tr>
          <td> Date Generated: </td> <td>" & Today() & "</td>
      </tr>" &
 "</table> <br>" &

"<strong> Items: </strong>" &
 "<table width='100%' border='1' cellpadding='5' style='border:3px solid black; border-collapse:collapse'>" &
      "<tr style='background-color:red'>
        <td>ContactPerson</td>
        <td>ToolNumber</td>
      </tr>
      <tr>" &Concat(Sort(MyTable,ContactPerson), "<td>" & ContactPerson & "</td><td>" & ToolNumber & " </td><tr>" )&
 "</table>"

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

 

Best regards,

kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: PowerApps: How to print/insert content of nested table in HTML?

Kris, Thanks for the reply. I have opened "New Idea" as suggested by you.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,788)