Hello,
Currently i'm trying to import a DFMEA Excel sheet into medini.
So far this forum helped me a lot to understand how to write the script.
But I'm facing an issue which i'm not able to solve.
My goal is to link measure to a Cause.
I have followed another topic wich explains how to do it (here), there is an extract of my script :
var potentialCause = Global.getFinder(fm_nolist.causedBy.toArray()).findByType(Metamodel.safetyModel.Malfunction).asList();
console.log("-----Affichage des causes -----");
console.log(potentialCause);
// For reading/writing measure it's more tricky
// We need to create a measure group first linked to the failure cause(s)
// Then add the prevention and control measure we want
var Cause_1 = potentialCause.get(0);
//Trashbin.deleteElement(Global.getFinder(Cause_1.measureGroups.toArray()).findByType(Metamodel.safetyModel.MeasureGroup).first());
var measure = Global.getFinder(Cause_1.measureGroups.toArray()).findByType(Metamodel.safetyModel.MeasureGroup).first();
console.log("-----Affichage du groupe de mesure(s) -----");
//measure.occurrence = new java.lang.Integer(3);
//measure.detection = new java.lang.Integer(8);
measure.detectionMeasures.add(Global.getFinder(measureCollectionPC.measures.toArray()).findByType(Metamodel.safetyModel.Measure).first());
measure.preventionMeasures.add(Global.getFinder(measureCollectionDC.measures.toArray()).findByType(Metamodel.safetyModel.Measure).first());
console.log(measure);
Everything seems to look fine, except the result is not shown to my FMEA sheet in Medini.
I have also tried to synchronize the worksheet with the function provided (here).
When I edit manually the entry into medini, the values are changing in my debug as you can see :

But when the script edit values, nothing change in the medini sheet.
Another question, form testing I have seen that we can have multiple measureGroup to the same cause. All those measureGroup should be displayed in the FMEA <?WORD FLAGGED?> ?
Thank you in advance.