Update other records values based on last record input

Update other records values based on last record input

Hello Community, 

Maybe a simple question for you guys, but I'm struggling with the following use case. 
We need to ensure we have only Approved Supplier which we can deal with. Those approvals are based on evaluation and qualification as shown in the illustration below. 

The example shows historical qualifications for the same supplier, and whatever the Qualification Status is, it is always the latest date that counts to show this supplier as approved. Therefor I'm using the "LATEST" column to filter my report with only approved suppliers. 

The issue I have is to ensure that when there's a new qualification (so a new record) with a more recent date, I would like all the history of "LATEST" to get the value "OLD"

I'm using the following script but does not seem to help. Any idea of what I'm doing wrong ?

  1. for each  rec in NEW_QUALIFICATION[QUALIFICATION_DATE > input.QUALIFICATION_DATE && SUPPLIER_NAME = input.SUPPLIER_NAME]
  2. {
  3. rec.LATEST="OLD";
  4. }


    Access your files securely from anywhere

        Zoho Developer Community




                                  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 Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • 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