diff --git a/src/app/formulaire/definition/form-compute-fixedvar.ts b/src/app/formulaire/definition/form-compute-fixedvar.ts index 1955e9350f40905ef743ed1e3a3be5eac17474e3..110235960ec380ccaf1b78306b885e15e11d1959 100644 --- a/src/app/formulaire/definition/form-compute-fixedvar.ts +++ b/src/app/formulaire/definition/form-compute-fixedvar.ts @@ -15,7 +15,20 @@ export class FormComputeFixedVar extends FormCompute { } private getVariatedParameter(): NgParameter { - return this._formBase.getDisplayedParamFromState(ParamRadioConfig.VAR); + let res = this._formBase.getDisplayedParamFromState(ParamRadioConfig.VAR); + if (res !== undefined) + return res; + + const pms = this._formBase.getDisplayedParamListFromState(ParamRadioConfig.LINK); + for (const p of pms) + if (p.valueMode === ParamValueMode.LINK) + switch (p.paramDefinition.referencedParamValues.valueMode) { + case ParamValueMode.LISTE: + case ParamValueMode.MINMAX: + return p; + } + + return undefined; } private getComputedParameter(): NgParameter {