I'm currently using M2Doc to generate automatic reports directly from the Medini model that authorities request from my company in a very concrete format.
We want to show them traceability with the derived requirements we have linked to Polarion.
What I have in the Word template is the following code (sc represents an FHA entry):
{ m:for req | sc.user_safety_requirements }
[{ m:req.identifier }] { m:req.name }
{ m:endfor }The intention of the above script is to loop within all the safety requirements traced to that FHA entry. The script for 'user_safety_requirements' (in the Hazardous Event profile) is the following:
self.mediniGetTracedElements(safetygoals::SafetyRequirement, 'Derived Requirement')->selectByType(safetygoals::SafetyRequirement)->asOrderedSet()
When the field in Medini is filled because there is a derived requirement traced to that FHA entry, it works as expected. However, when no requirements are traced, then the following appears in the M2Doc output.

Do you have any ideas on how can I solve this?
Thank you very much!