assign the values to field

assign the values to field

Hi..Zoho Developers,
 
I have two forms and views with same names.
 
form1 fields:
          filed1 - text field
          field2 - text field
          field3 - text field
Note:
above fields are fixed menas it has given values which will never changed.
 
form2 fields:
          filed11 - text field
          field12 - text field
          field13 - text field
 
What i want to do:
 
If form2 field12 = form1 filed2 then
     assign value to form2 field13 = the same value what form1 field3 has.
 
Note: form2 field13 is hiden to user and can not updated by user during entry.
 
any help is greatly apprecied.
 
what i have done so far:
 
I created two forms with above fields. and put the below code in on user input of field12.
 
for each x form1 [field2 = input.field12]  sort by field2
{
      input.field13 = x.field3
}
 
i don't get any error but the field13 value in form1 view is empty.
 
any idea ?
 
Thanks,