Trying to generate a custom report and getting an error when trying to add the resulting values back into the report columns -
The part of code causing the issue is this -
$Context.Items.Add($record, @{$initiatorBusinessPurposeColumnID = $BusinessPurpose},@{$initiatorDepartmentColumnID = $initiatorDepartment})
If I break up that line and run both separately like this -
$Context.Items.Add($record, @{$initiatorDepartmentColumnID = $initiatorDepartment}) $Context.Items.Add($record, @{$initiatorBusinessPurposeColumnID = $BusinessPurpose})
The script runs without error but it results in duplicate rows being created. Is there any way to run the $Context.Items.Add method to add multiple column values at once?