Copy documents within same bucket matching condition

My bad, newScenarioId is a new Guid() passed as parameter to the function