Problem: Cannot assign a single value to a dataobject
Hi,
I'm getting the following error: "Cannot assign a single value to a dataobject" whilst trying to iterate through a list.
Could you take a look? The code is at https://creator.zoho.com/ahatton/kidsoccer/htmlview/Viable_coaching_slots/edit/ (edit access provided to support).
and pasted here for reference, for other people.
- lstTimes = list();
- ...
- for each timeSlot in lstTimes
- {
- if (timeSlot.startsWith(hour + "-") && timeSlot.contains(day))
- {
- numSlots = numSlots + 1;
-
- coach_name = timeSlot.substring(timeSlot.lastIndexOf("-") + 1, timeSlot.length());
- availableCoaches = availableCoaches + " " + coach_name;
- }
- }
- resultString = numSlots + "-" + hour + ":" + (hour + 1) + "-" + day + "-" + availableCoaches;
- mostViableSlots.add(resultString);