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've been trying to use the "Update Raw XML" action from the Action Tool and I've been getting some strange results. At first, using Designer locally, it seemed to work properly. When I moved the app to the Gallery, I was getting some errors so I did some tests and saw that the problem was with the question value coming from the File Browse tool using a generated field map. It turns out this question value is different when you run the app in the Gallery, so I updated my Condition formula.
So I tried to run it again and got the same errors (in the Gallery). I thought it was something related to the Condition formula, but it was not. When debugging what I was doing, the condition was giving me True results (which it was what I needed), but the values were not being updated correctly by the Action tool.
I tried several options. What it makes more sense is the "Outer XML" one selecting the field I wanted to update. Tried that with a Replace formula and nothing happened. Tried to generate an empty string by using '', but it also did not work.
I tried then to update the Inner XML selecting the main value (Input Fields) and replace specifically only the field I'm trying to remove by '' , using - Replace([Destination], '<Address2>Address2</Address2>', '') and also did not have an update at all. I was thinking it could be due to meta characters (like < and >) but Alteryx seems to take care of them when you look at the formula in the XML view of the Action Tool.
The idea here is to change the Address2 field to [None] when the Condition is true. I've observed that this is achieved by removing this field from the XML configuration of the CASS Tool.
Has anyone ever experienced that? Am I doing something wrong?
I mocked up an example using a Text Box generating the same question value as the File Browse tool with Field Map generates. It is appended and I'm running version 2019.3 on it.
Hey @Thableaus it might just be the example you posted but it looks like you have the app set up to modify the Input, not the XML which generates the output.
Without the reference to the set you're using to modify, I wasn't sure how to make that change so I made a simple example where if the App allows the Cass tool to output Address2 if nothing is entered in the text box. Notice that the modified section of the tool falls under Output.
That's not the case, though. I'm not concerned about the Output. I'm not interested on having CASS_Address2 as an output. But sometimes an Address2 field is needed as an Input, to help generate other CASS fields, like, for example, CASS_Suite.
The thing is I set up a condition because this Address2 field is optional. If this field doesn't exist in my input file, CASS Tool throws an error. That's why I need to dynamically update CASS Tool to ignore the Address2 field.
I did a workaround to deal with this situation. I'm gonna put the solution here in the Community, but this workaround doesn't solve the initial problem that was the update on the Raw XML. I used two containers with the CASS tool inside, one with the Address2 selected and the other with No Address2 field at all, unioned the outputs and disabled each container according to the outcome of the Condition Tool (True or False).