Insert multiple rows with creator...possible?

Insert multiple rows with creator...possible?

I'd like to know if what I am attempting is just impossible in zoho or if I'm doing something wrong...any feedback is appreciated!

So in my application- basically an SEO order tracking app- I have a table for Orders (where the below script is coming from) and a table for Order Lines- each record in this table is one line out of an order- each order has a unique number and I select the number in a lookup to attach each line to an order.

Some websites that I do seo for have many urls and keywords- entering them in line by line for an order would be tedious, so I wanted to come up with a way to automatically insert records into Order_Lines for all of the URLs for a given client.

First I fetched records from the URL table where the client matches the client I select for the order.
I only want to do this automatic row creation in some cases, not always, so then I made a decision field called All and started the statement with if all = true

Then I set up the for each loop and the command to insert rows into order lines, with all the fields filled with necessary expressions and values- the syntax doesn't trigger any errors but I get no results. Any idea what I'm doing wrong here?


  1. if (count(URLs[Client_ID == input.Client_ID])  >  0)
  2. {
  3.     AllUrls  =  URLs  [Client_ID == input.Client_ID];
  4.     if (input.All)
  5.     {
  6.         for each key in AllUrls
  7.         {
  8.             insert into Order_Lines
  9.             [
  10.                 Added_User = zoho.loginuser
  11.                 Client_ID = key.Client_ID
  12.                 Client_Type = key.Client_Type
  13.                 Keywords = key.Keywords
  14.                 Line_Cost = (input.Order_Cost  /  count(URLs[key.Client_ID == input.Client_ID]))
  15.                 Month = zoho.currentdate.getMonth()
  16.                 Order_Number = input.Order_Number
  17.                 Total_Order_Cost = input.Order_Cost
  18.                 URL = key.URL
  19.                 Vendor = input.Vendor_ID
  20.                 Year = zoho.currentdate.getYear()
  21.             ]
  22.         }
  23.     }
  24. }