How to get value from subform fields?

How to get value from subform fields?

Hi all,

I can't get or assign value to a subform field when the trigger is on "User input".

"Harvested_Line" is a field in the subform.

Snippet:
lineList = List();
for each  record in Lines[Parent_Farm == input.Farm]
{
lineList.add(record.ID);
}
row.Harvested_Line:ui.add(lineList);

I get the error below:

Error at line number: 6
Variable 'row' is not defined.

But, this works perfectly if I change the trigger to "Addition of a row" and Choose Field is the subform's name.