Add Task if based on sub-form input

Add Task if based on sub-form input

Hello,

I have Brands containing a Voting sub-form.
Voting contains the following fields:
- User
- Rating

I would like to create a workflow so that whenever I add a Voting User to a Brand, it will create a task for that user if the Rating is null.

I have the following deluge script but I get:
`Error at line: 1 Improper Statement`
  1. for each Vote in Voting [ Rating != 0 ]
  2. {
  3. insert into Add_Task
  4. [
  5. Added_User = zoho.loginuser
  6. Assignee = Voting.users
  7. Related_Brand = Brand_Name
  8. Status = Open
  9. Task_Name = Vote on Opportunity
  10. ]
  11. }
Thanks for your help