Updating fields on other forms

Updating fields on other forms

I have very little experience with Zoho and I am struggling to understand how to make forms talk to each other. I have Form 1 (Legal_Waiver) that I want to use to update a field (Waiver_Verification)  to say "Completed" on either Form 2A (Student_Program_Registration) or Form 2B (Student_Program_Application), depending on whether the ID number they enter in the waiver (Participant_ID_Waiver) matches one used to fill out a registration form (Participant_ID_Reg) or an application form (Participant_ID_App). I also need it to update only the most current record, so I need to match the current academic year.

I have tried the following code based on a snippet that a consultant wrote:

UpdateRegForm = Student_Program_Registration[ID != 0 && Participant_ID_Reg == input.Participant_ID_Waiver && Prgm_App_Acad_Year == input.Academic_Year_Waiver];

UpdateRegForm.Waiver_Verification_Reg=input.Verification_Waiver;

UpdateAppForm = Student_Program_Application[ID != 0 && Participant_ID_App == input.Participant_ID_Waiver && Prgm_App_Acad_Year == input.Academic_Year_Waiver];

UpdateAppForm.Waiver_Verification_App=input.Verification_Waiver;


But I receive this error message when I try it out:


Any help would be appreciated!