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
Solved! Go to Solution.
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:
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
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:
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
User | Count |
---|---|
252 | |
104 | |
94 | |
50 | |
39 |