How to use deluge scripts to insert rows to subform

How to use deluge scripts to insert rows to subform

I have 2 forms, Box form with Seed_Packs entries that links to another Form Seed_Inventory entries. After I have use the import functions, the entries did not link from Seed_Inventory to Box.Seed_Packs, I want to use scripts to do the linking by creating a schedule flow to run it manually.

The following is my code:

//create a subform collection
subformCollection = Collection();

//define the rows to be inserted
row1 = Box.Seed_Packs(Box_ID = "GB_0003");

//get data from seed inventory
getBoxID = Box[Box_ID = "GB_0003"].ID;
getSeedInventory = Seed_Inventory[Box_ID_QR = getBoxID].Stock_ID.getAll().toList();

//looping entries from seed inventory and recursively insert the rows to Box.Seed_Packs
for each rec in getSeedInventory
{
row1.Seed_Inventory = rec;
subformCollection.insert(row1);

But I am stucked as when I execute the flow, i got the following error:

Invalid update task found corresponding properties Line:(7) which refer to "row1.Seed_Inventory = rec;"

Any help is highly appreciated.

Thank you!

    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