What does this script do?
- Where your report-writer has created a comma-separated field of data items, it separates that field into an array.
- Then rewrites that report line for each data item.
What are the key issues being solved here?
- The comma-separated field is split into its individual items in an array.
- Note in line 36 that the separation in my reports is a space and a comma, hence " ,". If your separation is just a comma then this will read ",".
Why did I develop this?
- The field of comma-separated data is very common in ProSolution and doubtless in other MIS packages.
- The most common issue for me is the list of activity codes that is attached to a timetabled session. I need to see that on a one-to-one correspondence as I need to be able to run my own queries, for example to get a list of all the maths sessions that a particular activity code is attached to (and thereby an individual student is in).
Here's a 'before' and 'after' of this script running.