I would like to give an initial value to a lookup field (multiselect) dynamically.

I would like to give an initial value to a lookup field (multiselect) dynamically.

In my samples form, I have a look up field "sample type", from a sample_type form, which displays the name of all sample type in a single select drop down.
In the same form (samples), there is a lookup field "parameters", from a parameters form, which displays all parameters, in multiselect list.

But, in the the sample_type form, there is already a look-up parameters field from the parameters form, which displays all parameters, in multiselect list.

A sample type has already the parameters chosen. But when we create a sample through the samples form, I want to give the option to add few more parameters in addition to the one already recorded in the sample_type form.

In the samples form, I see a system like that : When we choose a sample type (lookup field, single select), the parameters belonged to this type become selected automatically in the multiselect list of the lookup parameters field.
In this way, the user can know what are the parameters of this sample type, and he can add or take off the parameters he wants.

I tried with this tutorial : dynamically adding items to a picklist . But i don't succeed.

Can you help me please?

Thank you.