Thanks for reaching out on Microsoft Q&A!
I've tested your request in my test lab, and I noticed your ['material_cd'] attribute contains a string, where you must first "convert" it to an array with lines before it can become a HTML table. To do this the following principle applies to your example:
- First split the rows by the \n (line break) character
- Next select all rows, while splitting the columns based on the comma (,)
- The output can be converted to the HTML table you're looking for
So first we're going to break the rows in pieces using the line break character \n. You can do this be referencing the triggerBody()['material_cd'] in your code like this in a Compose action:
split(triggerBody()['material_cd'],'
')
Next we're going to use the outputs of the Compose action to split the columns in each row using the following function (with a defined header and the index of the column):
split(item(),',')[0]
After that you can use the outputs of the Select action in the create HTML table:
This results in the table you wished:
Please let me know if this answer was helpful by clicking 'Accept answer'. Feel free to drop additional queries in the comments below!