Problem: Cannot assign a single value to a dataobject

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.

  1. lstTimes = list();
  2. ...
  3. for each timeSlot in lstTimes
  4. {
  5.     if (timeSlot.startsWith(hour + "-") && timeSlot.contains(day))
  6.     {
  7.         numSlots = numSlots + 1;
  8.        
  9.         coach_name = timeSlot.substring(timeSlot.lastIndexOf("-") + 1, timeSlot.length());
  10.         availableCoaches = availableCoaches + " " + coach_name;
  11.     }
  12. }
  13. resultString = numSlots + "-" + hour + ":" + (hour + 1) + "-" + day + "-" + availableCoaches;
  14. mostViableSlots.add(resultString);