As there are only 2KAs I’ve not attempted an outer loop for those as I’m not sure how well that is supported (i.e. I don’t recall trying it). Left as an exercise for the reader is adding a header row, if needed, for the output.
Also, as you’re exporting a CSV file consider making the note’s $HTMLExportExtension value “.csv”
Done! Not sure if it’s the most efficient way, but it works. Each action creates one string by iterating through all values of the selected key attribute, and then ^value(…)^exports that string.
Not sure if I could / should embed the ^value(…)^ code inside the ^action(…)^ code (or even if it’s possible).
Thanks Mark for the clarification on key attribute’s inheritance – it’s important to know.
Tried your code, and it works, but for only one “MyThingA” and one “My ThingB”. Problem is that the ^action iterates all values, but ^value only outputs one because it’s outside the action loop (I think!).