scripting reference to bi-directional field

scripting reference to bi-directional field

Hi, I've consistently had the problem I'm about to lay out in my application and thought it was a limitation of Zoho. However, I don't see it listed anywhere else as a complaint so maybe it's just our application and someone can fix it? 

The problem stems from bi-directional fields and trying to reference those in scripts. For a specific example, we have a Monthly Meeting form. We use this form to do multiple things, including track attendance at our monthly meeting. The Attendance field is an import from another form called Contacts (the field Full_Name), and there is a bi-directional relationship with the field Monthly_Meeting_Date from the Monthly Meeting form.

We send out an auto email asking people for RSVP's in advance, which directs them to a 3rd form, this one a stateless form that is called Monthly Meeting RSVP. The email has links for Yes, No and Maybe and whichever link they choose contains their ID (which is not displayed) and their RSVP (which is displayed on the form and which they can change). When they click submit, the script is set to look up who they are by their ID and check to see if they are already in the Attendance field (for Yes RSVP), in the No field or the Maybe field so it can remove/add them to the appropriate spot and make sure they are not listed somewhere else.

When I try to do the following code (I'm sure this is not as elegant as it could be), it appears to save fine:
  1. t  =  Contacts  [ID == input.recID];
  2. if ((input.Options  ==  "Yes")
  3. {
  4. r  =  Monthly_Meeting  [Date_field > zoho.currentdate] range from 1 to 1;
  5.     temp = r.Attendance.getall();
  6.     temp2 = r.No.getall();
  7.     temp3 = r.Maybe.getall();
  8.     if (temp2.contains(t.Full_Name))
  9.     {
  10.         temp4 = List:String();
  11.         temp4.add(t.Full_Name);
  12.         temp2.removeall(temp4);
  13.         r.No = temp2;
  14.     }
  15.     if (temp3.contains(t.Full_Name))
  16.     {
  17.         temp5 = List:String();
  18.         temp5.add(t.Full_Name);
  19.         temp3.removeall(temp5);
  20.         r.Maybe = temp3;
  21.     }
  22.     if (temp.contains(t.Full_Name))
  23.     {
  24.         alert("Your RSVP has been successfully submitted!");
  25.     }
  26.     else if (!temp.contains(t.Full_Name))
  27.     {
  28.         temp.add(t.Full_Name);
  29.         r.Attendance = temp;
  30.         alert("Your RSVP has been successfully submitted!");
  31. . . . .
The problem is that it doesn't ACTUALLY save it this way. It saves each instance of "r.Attendance" as "r.Attendance.Monthly_Meeting_Date". Again, Monthly_Meeting_Date is the bidirectional field name that shows up in the linked Contacts form so it appears to be trying to save the title of the field name in BOTH of the linked forms. Of course this generates an error when you try to use the form because it is not valid syntax. Of course it also won't save if you open the script and leave that syntax in there.

The aggravating thing is that the form was working fine initially after I made it a bi-directional field. It only stopped working and did this when I went back and corrected a minor error in the script elsewhere. I really need to keep this field bi-directional because I have several views built off the Contact form that use this data from the monthly meetings. I'm sure I could think of some elaborate work around but really don't want to go there after having done it before with other forms. I'm also under a deadline here because we are due to send out another email RSVP reminder in a couple of days. Any timely help is greatly appreciated!