check info before Syncing two Subforms

check info before Syncing two Subforms

Hi

i have a secondary form that dumps its info into a master report. The secondary form has a subform and there is a corresponding subform in the main report

CASE: 
Main form alreayd has ONE SAMPLE_ID listed on it
User submits on secondary form adding a new row, and a new SAMPLE_ID

GOAL: 
When submitting, the code should look at the main form, see all the SAMPLE_IDs already listed on each row in the subform, and then add the new SAMPLE_IDs from the secondary form that are missing

so far, here is my code:
  1. for each row in FetchID.Linked_Samples
  2. {
  3. SampleIDCollect.insert(row.Sample_IDs);
  4. }
  5. for each row in Linked_Samples2
  6. {
  7. if(!SampleIDCollect.ContainsValue(row.Sample_IDs2))
  8. {
  9. NewRow = Product_Form.Linked_Samples();
  10. NewRow.Sample_IDs=row.Sample_IDs2;
  11. NewRow.Factory=row.Factory2;
  12. NewRow.Status=row.Status2;
  13. FetchID.Linked_Samples.insert(NewRow);
  14. }
  15. }
  16.  
The error i am getting is: 
"Error at line number: 8
Variable SampleIDs2 does not exisit in ZC_SUBFORM_17"

SampleIDs2 exists in the SECONDARY form's subform. this error is telling me that it doe NOT exist in the MAIN form

i think deluge is getting stuck thinking that the "row" in line 8 still applies to the main form's subform (FetchID.Linked_Samples) , when really ive already closed that bracket and opened a new "for each row" which applies to Linked_Samples2 (the secondary form's subform)

I think this may be a deluge bug, but any other advice?
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly 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




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方