subform field won't trigger

subform field won't trigger

Hi,

I am trying to get a on user input script to copy information from a emergency contact form into the join table that is part of a subform.

The master form is Call_Sheet, the join table that is part of the subform is Emergency_Contact, the form where the information is held is in Emergency_ContactsINFO.

Basically the alert doesn't trigger which means my if isn't working- and I don't know why. Another user has suggested that it is a zoho area.


if (Emergency_ContactsINFO[ID == row.Emergency_Contact].count()  >  0)
{
    emginfo  =  Emergency_ContactsINFO  [ID == row.Emergency_Contact];
    row.Address = emginfo.Address;
    row.Number = emginfo.Phone;
    alert("it's Working");
}

This is the other script I tried that is an adaption of one that works in another situation
but it still doesn't put in the address or phone.

//gets information from third table
emginfo  =  Emergency_ContactsINFO  [ID == row.Emergency_Contact];
row.Address = emginfo.Address;
row.Number = emginfo.Phone;


Thanks

Reuben