Hi everyone,
I have a workflow that uses data where the column names can vary from one run to another.
In my process, I use a Cross Tab tool that I’ve made fully dynamic using two macros:
- The main macro takes as input the grouping columns, the header column, the value column, and the aggregation method. It dynamically generates the XML formula for the Cross Tab tool.
- This formula is then passed to a secondary macro, which uses a Control Parameter + Action tool to inject the formula into the Cross Tab tool.
Everything works fine, and the workflow runs successfully, but I get a false error message in Alteryx:
ActionToolId:6 contains an error: XML parse error: message=expected >, Location=<Field fied="Fichie<Field fi..."
This message only appears when column names contain an underscore, such as Fichier_Prix.
If I exclude all columns with underscores, the error message disappears.
I tried to protect the field name using XML entities like:
'<Field field="'+name+'" />'
But it doesn’t work — Alteryx doesn’t seem to recognize " as a valid quote character in this context.
So I ended up writing it like this instead:
'<Field field="' + name + '" />'
🔍 Question:
Does anyone know how to safely handle column names containing underscores in the XML formula, or how to prevent this false error message while keeping the workflow dynamic and functional?
Thanks in advance for your help!