This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have a workflow where I am reading in different XML files. They don't always look the same. They come from a reporting tool and I am checking for three different data containers in the report's XML. If the report has all three containers, my workflow runs perfectly! Otherwise, the XML doesn't include code from that data container and the XML Parse tool says "hey! that field is missing!"
Is there any way to bypass this? Can I include a tool that says "if this column is missing then let's skip this section of the workflow, otherwise keep on going!"
In other words, when the report contains a Singleton, this works:
But when my report does NOT contain a Singleton, this error pops up on the same tool:
What do y'all think? I tried to add a filter and union the two back together so I get an output of Null values but the workflow can't move past this error, even when I say to ignore the XML.
How do I see if a column exists if it only sometimes exists?
You could put this in a macro, check if the field exists, and use a control parameter to turn the tool container on or off depending on whether or not that field exists. But that's not a super elegant solution, so maybe there's something in the XML tool that someone else can recommend....