Is there a way to place text - pulled from a list - before an array?
For instance, my current table looks like this:
Question user needs to answer? Answer to question. |
Question user needs to answer? Answer to question. |
I am looking to include something that would look like this:
| SECTION ONE |
Question user needs to answer? Answer to question. |
Question user needs to answer? Answer to question. |
| SECTION TWO |
Question user needs to answer Answer to question. |
Ideally, this text would only be visible if the array is not empty. If it is empty, no section header for that array.
My use case is as follows: I'm creating a document by generating a custom table. The values are stored in a Dataverse table, and the user adds records through a PowerApps canvas app. There are eight sections of this form, though the user may not fill out all questions. In the form, they are routed to different sections based on their answers. The requirements are that by the end of this form, they will have a document that only includes the sections and corresponding questions that they answered.
Since I am creating the table dynamically, I had to create a reference list in SP that stores all the internal names of the fields from the Dataverse. I have a 'Apply to all' condition that cycles through all the internal names in SP, checks if they exist in the Dataverse [Get row by id query], and if they do, it grabs the answer and corresponding question from each section and appends this information to an array. There are eight arrays to correspond with the eight sections.
I need to be able to insert a row heading at the beginning of each section Array. Here are the actions in my flow that create the table:

The concat formulas are:
concat('<tr><td><p><b>',item()['Question'],'</b></p><p>', item()['Answer'],'</p></td></tr>')
In the join I am doing the following:
join(body('section_one_select'),decodeUriComponent('%0A'))