From what i could understand, you want your form to have as many rows as the serial number.
And the serial no. will reside in a text field.
refer to the instanceManager function in designer's Scripting reference help, which creates a new instance of a table row.
once you figure out how to create once instance, then you can wrap that in a loop. Read the rawValue of the SerialNumber text field, and run that loop iteratively.