Hello,
the company i work for does market research, and every datafile has differently named fields.
The concept "region" can be "country_code" or "ccode" or "region_code", whatever comes to the pm's mind :)
That's why all my flows need to be very dynamic and I always work with the raw xml.
One of my macro's (attached) takes a list of fields and converts them all to a "group by" XML.
If i enter "variableA" & "variableB" into my macro, then it would return
<SummarizeField field="variableA" action="GroupBy" rename="variableA" /> <SummarizeField field="variableB" action="GroupBy" rename="variableB" />
The issue is that I always assumed there would be multiple fields, and it breaks when there is only one (it gives an error when I just enter "variableA".
I can adapt it so that it accepts one field, but then it breaks when there are multiple fields :D
Can anyone give a tip on how to rewrite this macro, so that I can enter both one and multiple fields?
thanks!
Mikis
Solved! Go to Solution.
@Mikis I setup the attached workflow and macro as I think these are what you're looking for based on your post. If I've missed something, let me know. I wasn't able to run your macro as it had a nested macro, so you would just need to upload that Dynamic Text to columns macro as well if my macro isn't working and I need to further look at your macro.
@patrick_digan holy moly what a clean and simple solution
looking back at my own dragon of a macro, I wonder what I was thinking :D