Autofilling fields in subform with multiple rows

Autofilling fields in subform with multiple rows

Hi, 

I've made a subform (Next_Steps_subform) and a want the input in one field (Next_steps_responsible) to dictate an autofill in "User". I have created the below code and it works fine on the first row created in the subform, but not in subsequent rows. Image attached to show issue.

Any idea why?


if(input.Next_Steps_Subform.Next_Steps_Responsible == "Callum Wood")
{
input.Next_Steps_Subform.User = "alderhey";
}
if(input.Next_Steps_Subform.Next_Steps_Responsible == "Jason Taylor")
{
input.Next_Steps_Subform.User = "jasontaylor11";
}
if(input.Next_Steps_Subform.Next_Steps_Responsible == "Carol Platt")
{
input.Next_Steps_Subform.User = "zoho_carol347";
}
if(input.Next_Steps_Subform.Next_Steps_Responsible == "Sophie Reade")
{
input.Next_Steps_Subform.User = "sophie.reade";
}
if(input.Next_Steps_Subform.Next_Steps_Responsible == "Emma Hughes")
{
input.Next_Steps_Subform.User = "zoho_emma493";
}