Overwrite value in pickinglist

Overwrite value in pickinglist


Hi

I have a system where, the selected value in "type of Legend" select a certain person in the pickinglist "Assigned to responsible".




In the field "Assigned to resonsible" I have a script that updates (on input) the fields "dept." and "email" based on the following script;  

if (input.QMAssigned_to_responsible  !=  "-Select-")
{
    if (count(EmplDetails[Name == input.QMAssigned_to_responsible])  >  0)
    {
        dat  =  EmplDetails  [Name == input.QMAssigned_to_responsible];
        input.QMDept1 = dat.Department;
        input.QMEmail1 = dat.MailId;
    }
}

My question. Is it posssible to let ZC overwrite the field "Assigned to responsible" based on the value selected in field "Email of responsible engineer"?

Br Skouboe