Hey All!
I have 3 SQL tables which I want to pull data from to create a HTML report.
Example of my tables.
Groups
| ID | group_name |
| 1 | Group 1 |
| 2 | Group 2 |
| 3 | Group 3 |
Questions
(Questions.q_groups = Groups.ID)
| ID | question | q_group |
| 1 | Question 1 | 1 |
| 2 | Question 2 | 1 |
| 3 | Question 3 | 2 |
| 4 | Question 4 | 2 |
| 5 | Question 5 | 3 |
| 6 | Question 6 | 3 |
Answers
(Answers.1_id = Questions.ID, Answers.q_groups = Groups_ID)
| ID | q_id | q_group | answer |
| 1 | 1 | 1 | true |
| 2 | 2 | 1 | false |
| 3 | 3 | 2 | false |
| 4 | 4 | 2 | true |
| 5 | 5 | 3 | true |
| 6 | 6 | 3 | false |
What I would like my outcome to look like.
Group 1
Question 1 - true
Question 2 - False
Group 2
Question 3 - false
Question 4 - true
Group 3
Question 5 - true
Question 6 - false
My flow currently looks like this:

The Output looks like this:
Pre-Visit Tasks
{}
Router, Firewall, PBX
{"Table1":[{"question":"Do they have Meraki or USG?"},{"question":"Does the site have redundant WANs?"},{"question":"Are Firewall rules appropiate?"},{"question":"Is Content Filter enabled?"},{"question":"Is Advanced Threats enabled?"},{"question":"Are alerts enabled?"},{"question":"Review Event/Threat logs?"},{"question":"Cloud only, DHCP & DNS Configured?"},{"question":"Do they have 3CX?"},{"question":"Do they have Full Unifi at all sites?"},{"question":"Are all APs in Cloud Controller?"},{"question":"Are all APs mounted in suitable location?"},{"question":"Is Firmware Upto Date?"},{"question":"Is hardware in date?"}]}
Server Room & Cabs
{"Table1":[{"question":"Are all servers operating without visual warnings?"},{"question":"Is airflow to the servers suitable?"},{"question":"Are all devices plugged into a UPS?"},{"question":"Is the UPS Managed and Smart? Can you get 30 Mins runtime?"},{"question":"Are all UPS's in Warranty?"},{"question":"Are UPS's recorded in ML? Serial/Model/Location/Warranty?"},{"question":"Is Cabling tidy?"},{"question":"Are switches UniFi?"},{"question":"All critical devices labled with IP?"},{"question":"Are all servers and backup appliances on Gigabit?"},{"question":"Are servers in warranty?"},{"question":"Record server Serial Tag and Warranty in ML."}]}
RMM Checks
{"Table1":[{"question":"Do all servers have the agent installed?"},{"question":"Are servers running support OS?"},{"question":"Are servers in the correct patch group?"},{"question":"Are servers disks >10%?"},{"question":"All sites WAN IP's listed?"},{"question":"Do all endpoints have Webroot installed?"},{"question":"Are endpoints in the correct policy?"}]}
Host
{}