I am to create a document from two SharePoint lists. One list contains category headings of Violations. The other list contains descriptions for different levels of those violations.
Here is my template:
<<foreach [violation in violations]>>Violation: <<[violation.viol]>>
- <<foreach [nature in violation.natures]>><<[nature.item]>>
<</foreach>>
<</foreach>>
The Json format from the input step of the populate Word Document action is below:
[
{
"viol": "Dilution in Lieu of Treatment",
"definition": "Dilution occurs when an IU adds water to their effluent for the purpose of decreasing the concentration of measured pollutants in order to meet pretreatment standards.",
"basepts": "1",
"natures": [
{"item": "Unaware"},
{"item": "NA"},
{"item": "NA"},
{"item": "Intentional"}
]
},
{
"viol": "Discharge of Hazardous Waste",
"definition": "Discharge of waste or wastewater that meets the definition of a RCRA Hazardous Waste into the POTW's collection system without prior approval from the CA.",
"basepts": "1",
"natures": [
{"item": "Unaware"},
{"item": "NA"},
{"item": "NA"},
{"item": "Intentional"},
{"item": "User unaware of discharge or unware of RCRA status"},
{"item": "User aware of discharge and failed to report."}
]
},
{
"viol": "Failure to Comply with Corrective Action",
"definition": "Related to other enforcement mechanisms previously issued which requires corrective action. Corrective actions may be communicated in NOVs or other less formal enforcement mechanisms including inspection reports. Does not apply to compliance schedules (e.g., issued in control mechanisms, consent or compliance orders; see Compliance Schedule Milestone).",
"basepts": "0",
"natures": [
{"item": "Unaware"},
{"item": "NA"},
{"item": "NA"},
{"item": "Intentional"},
{"item": "User unaware of discharge or unware of RCRA status"},
{"item": "User aware of discharge and failed to report."},
{"item": "Equivalent interim measure implemented"},
{"item": "Interim measure implemented, only partially adequate to resolve deficiency"},
{"item": "No interim measure implemented"},
{"item": "Corrective action ignored"}
]
}
]
However, i get the following error:
Error! Can not get the value of member 'item' on type 'System.Char'
I've tried Allowing Missing Values, and it finds the viol value, but the items in the bullet points are blank (and it generates 1100 pages of them).
I've also tried the following template with the same results:
<<foreach [violation in violations]>>Violation: <<[violation.viol]>>
- <<foreach [nature in natures]>><<[nature.item]>>
<</foreach>>
<</foreach>>