Creator: How to add subform row to main form with deluge

Creator: How to add subform row to main form with deluge

We have a stateless form named "Bulk Schedule Jobs". When this form is submitted, it loops through existing account records that match the selection made in the stateless form, then it creates a new record in the system via the "Add_Job_Form".
Essentially, when someone submits the form it bulk creates jobs in the system for each account that is assigned to the program.

PROBLEM
I can successfully bulk create the jobs via the code below, but I cannot figure out how to populate the subform within the "Add_Job_Form".
When adding a new record into the system via deluge, how can I also create a new row in the subform?


  1. for each record in Add_Account_Form [ Programs.Program_Name == Program_Name ]
  2. {
  3. if ( record.Programs.Program_Name == input.Program_Name ) 
  4.     {
  5. insert into Add_Job_Form
  6. [
  7. Added_User = zoho.loginuser
  8. Status = "Pending"
  9. Account_Name= record.ID
  10. Customer_Name = record.ID
  11. Account_Number = record.Account_Number
  12. Job_Address.address_line_1 = record.Service_Address.address_line_11
  13. Job_Address.address_line_2 = record.Service_Address.address_line_21
  14. Job_Address.district_city = record.Service_Address.district_city1
  15. Job_Address.state_province = record.Service_Address.state_province1
  16. Job_Address.postal_Code = record.Service_Address.postal_Code1
  17. Job_Address.country = record.Service_Address.country1
  18. Job_Address.latitude = record.Service_Address.latitude1
  19. Job_Address.longitude = record.Service_Address.longitude1
  20. ]
  21.     }