Populating a field with a customers name based on their email

Populating a field with a customers name based on their email

Hello, I am trying to auto-populate a field with a customers name base on the email address which they use to login. The email address they use to login is the same as in their customer details. Their name and email address is on a form, called customer details and their name is in a field called <known_as> and their email address is called <app_email>. The deluge code someone gave me is this:
  1. //remember to change form/field names accordingly
  2. f1Record = Availability[Email = zoho.loginuserid];
  3. //update field
  4. input.User_Name1 = f1Record.User_Name1;
  5. //App_Email
However, it is not working, I know that I probably need to reference back to the customer details form but I cannot get it to work.