Hello,
In my workflow, I am trying to update XML of a repeating section on my form. I am using Nintex O365.
The data is saved in a Multi-Line Plain Text field called CERS Element Line Items. I am able to parse the XML with no problem. In a For Each Loop, I save the Output Index in a variable called itemElementIndex. I use this same variable in an Update XML Action. Below is a screenshot of the configuration of Update XML.
Regarding the long name at the end of the XPath query. I know it is right, because I am able to extract the data from the XML and I see the values in my History log.
I get the error: “An exception occurred while processing parameter [InputXML]”
What am I doing wrong? What other information do you need?
Solved! Go to Solution.
Hello Nintex Community,
Does anyone have any thoughts on this?
Hi,
From the screenshot I understood that you are trying to replace the content in a specific node with "No", have you tried storing the updated XML in a variable (Result XML) and then to log history? Is the updated XML in correct format?
@kchaluvadi Thanks for your reply. I logged the data in History (see below). In this example, it was the first instance, which is showing as 0 (zero) in the XML. Does this look right?
//Items/Item/0/_dee529ff55b1e8e7385ed7bd90ef974a
Is it possible to update 1 item? Or do I need to recreate the whole XML string? If that is the case, any ideas on how I would do that?
Hi
Is it possible to update 1 item? - Yes, as per the Nintex documentation, you can update as mentioned below.
Selected node(s) action |
Specify the operation to perform on the selected node. Select one of the following options.
|
And you can store the result of the updated XML (last field in the action, Result XML). So, update your workflow action with a variable to store the result of updated xml. Since the "log history" has limitation of number of characters to print, add an email action, insert that variable in the "message" and send that email to yourself. Once you get the email, check if the xml is valid or not, there are lot of online xml validation sites
More help on Update XML from Nintex documentation, hope it helps.
Have you tried log the {Variable:intIndex} ?
If Log prints correct value, 1, then the action that you are using did not like the way you are passing it. You can try different way using "Build String" action.
I just tried usig buildstring action, it worked, here is the screen shots ( I hard coded the intIndex to 1):
BuildStringAction
Result in Log to History List action
Build String Output
Hope this helps!
Yes. It shows as 1
Ok, as shown in srceen shots in my previous reply, use a build string action to build your xml node structure and store in a vairable, "txtNodePath", and pass this variavble to your "Update XML" action.