Nevertheless, I was attempting an easier solution based on previous posts. I would like to finish now both because it will allow me to easily customize the outcome and out of curiosity. It uses Export Selected Note on an agent note, a csv wrapper:
Can you clarify the exact input and output strings needed, or if easier explain the CSV edge case you are trying to avoid.
Enclosing all your value strings in (straight) double-quotes will automatically escape any commas therein.
$ExportAttributes is a custom attribute in which to manually write the names of the attributes that will get exported. It is used in the agent which has this csv export template assigned.
In any case, my primary purpose in this post was to learn how to use the .each() function. I approached it via the csv export cases because I found some examples in the forum.
I can do csv export by writing the attribute fields to be exported in an export template itself, not in an $ExportedAttributes custom attribute. But, about the .each() function, I have read the available documentation and, given my programming skills, I don’t understand how to use it.
I realise the unresolved question in this post may be confusing for future users of the forum wanting to know how to export to csv. Therefore, may I suggest that this post is deleted?
I will explain in a new post the real case I am trying to solve, in need of .each().