I have a form with a Checkbox Multiselect field "workerchoose1", I want to iterate the selected values, and create new records, I save the script correctly but when I send the form I got this error. (If you need access app is share Form DailyTimeReport On Success).
if (input.scheduleselect == "Entrada 1")
{
for each selectedValue in input.workerchoose1
{
workerID = Employees [wkname = "input.workerchoose1"];
fetchwk = TimeFixture [ID = workerID.ID];
if (fetchwk == null)
{
insert into TimeFixture
[
Added_User = zoho.loginuser
rdate = input.rdate
Proyecto = input.Proyecto
Employee = workerID.ID
starttimehour1 = input.starttimehour1
starttimemin1 = input.starttimemin1
]
}
else
{
fetchwk.starttimehour1 = input.starttimehour1;
fetchwk.starttimemin1 = input.starttimemin1;
}
}
}