Error in dynamic pick list script

Error in dynamic pick list script

I was hoping someone could help debug this for me.

I have used a dynamic pick list a couple of times now and it has worked but this one won't - it gives me an 'error occurred while executing on user input script'.

So I have a parent form (Equipment1) that has Equipment in it - Type: Cameras, sound gear and lighting. I also have a name for each one Name: Michael's Z1p (which is a type of camera) in a radio button field.

In the child table (Equipment_Link) I want to select the type: "camera" in a drop down and then have the software dynamically pick just cameras.

When my script 

Type:on user input
x = Equipment1[Type = input.Type].Name;
Equipment_Name:ui.add(x);

is triggered by entering 'camera' into the Type field of the child form I get a user error.
The error does not trigger if I select Lighting which has no records.

What have I got wrong?