Using two pick lists and call functions

Using two pick lists and call functions

Hello, this may be an easy question but I cannot get it to work for the life of me. 

I am using Zoho Creator and am trying to get the records of my accounts in a dropdown list (this part works fine)
and then get the associated contacts in another dropdown list

->on add->on Load
  1. crmAccount = zoho.crm.getRecords(("Accounts"),1,200);
  2. for each AccountName in crmAccount
  3. {
  4.     Company_Name:ui.add((AccountName).get(("Account Name")));
  5. }
and then on the account drop down list on update I want the next list to just show the contacts related to the account 

crmAttempt = zoho.crm.getRelatedRecords("Contacts",("Accounts"),input.Company_Name,1,100);
for each plumber in crmAttempt
{
    Plumber_Name:ui.add(plumber.get("First Name"));
}

doesn't work but i think it is because I am not getting the actual i.d. number from input.Company_Name but the actual Company Name.


How can I make this work please help!