How to set a field to a value contained in another form On Input, etc. while referencing a selected key value

How to set a field to a value contained in another form On Input, etc. while referencing a selected key value

I know this is doable, but the tool (Script Builder) and my still weak expertise in Deluge is preventing me from joy on this simple task.

In a form I have a lookup drop down which gets populated with a list of names from another form.  No problem, works fine.

What I want to do is when a user selects one of the names in the lookup drop down list, another single line field in the form gets populated with a piece of information from the other form related to the selected record in the lookup drop down.

For example:

Form 1:  Students
...Field 1:  Name
...Field 2:  Age

Form 2:  Students_In_This_Class
...Field 1: Select_Student_Name   <-- from lookup-dropdown referencing Names in Form 1
...Field 2: Student_Age  <-- I want this field automatically populated with the Age of the student with the selected Name

I know the syntax must be something like this when done On Success or On Input or On Update, etc.:
input.StudentAge = Students.Age[input.Select_Student_Name];

But, I keep getting syntax error messages when saving the script, so I'm stuck on such a simple task.  I've had great trouble finding a proper reference in Help for this.

Any help, kind fellow-developers?

Greg