diff --git a/src/app/formulaire/elements/select/select-field-searched-param.ts b/src/app/formulaire/elements/select/select-field-searched-param.ts index 2b5e1a501eae2e55f34a13dfef7fa28162c73d31..978cdebc98f7047fe5151c851d57d22523b16727 100644 --- a/src/app/formulaire/elements/select/select-field-searched-param.ts +++ b/src/app/formulaire/elements/select/select-field-searched-param.ts @@ -26,7 +26,15 @@ export class SelectFieldSearchedParam extends SelectField { for (const p of searchableParams) { if (p.visible) { - const calcTitle = fs.getTitlebyIdOnSelectedLoadedNubs(p.originNub.uid).title; + let calcTitle; + // if form already exist + if(fs.getFormulaireFromId(p.originNub.uid)) { + calcTitle = fs.getFormulaireFromId(p.originNub.uid).calculatorName; + } + // prevent issue #369 (loading session) + else { + calcTitle = fs.getTitlebyIdOnSelectedLoadedNubs(p.originNub.uid).title; + } const varName = fs.expandVariableName(p.originNub.calcType, p.symbol); const label = `${p.symbol} - ${varName} (${calcTitle})`; this.addEntry(this.createOrGetEntry(this._entriesBaseId + p.getParentComputeNode(false).uid + "_" + p.symbol, p, decodeHtml(label)));