Updating a field in another form when changes occur in current form

Updating a field in another form when changes occur in current form

I have two forms that are linked via a lookup field.

One of the forms is called Add_a_Class and the field is called "Students". The other form is called Add_a_Student and the field is called "Enrolled_Classes"

In my Add_a_Class form, I also have a field called "Number_of _Students_Enrolled". I currently have a workflow on User Input of the "Students" field that Inputs the "Number_of_Students_Enrolled" field:
input.Number_of_Students_Enrolled = input.Students.size();

I would also like to create a workflow for my Add_a_Student form on User Input of the "Enrolled_Classes" field to update the "Number_of_Students_Enrolled" field in my Add_a_Class form. 

Could anyone assist me with how I would write this script?

Thank you!




                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                              Zoho TeamInbox Resources

                                                Zoho DataPrep Resources



                                                  Zoho CRM Plus Resources

                                                    Zoho Books Resources


                                                      Zoho Subscriptions Resources

                                                        Zoho Projects Resources


                                                          Zoho Sprints Resources


                                                            Qntrl Resources


                                                              Zoho Creator Resources


                                                                Zoho WorkDrive Resources



                                                                  Zoho Campaigns Resources

                                                                    Zoho CRM Resources

                                                                    • CRM Community Learning Series

                                                                      CRM Community Learning Series


                                                                    • Tips

                                                                      Tips

                                                                    • Functions

                                                                      Functions

                                                                    • Meetups

                                                                      Meetups

                                                                    • Kbase

                                                                      Kbase

                                                                    • Resources

                                                                      Resources

                                                                    • Digest

                                                                      Digest

                                                                    • CRM Marketplace

                                                                      CRM Marketplace

                                                                    • MVP Corner

                                                                      MVP Corner

                                                                    





                                                                    




                                                                        Design. Discuss. Deliver.

                                                                        Create visually engaging stories with Zoho Show.

                                                                        Get Started Now