Page 1 of 1

Data Manipulation with &

Posted: January 31st, 2023, 2:15 pm
by CameronDouthitt
I am working on a customers address import and some of the names come through from JDE with the & symbol converted to &
image.png
image.png (2.29 KiB) Viewed 202 times
image.png
image.png (2.29 KiB) Viewed 202 times
Later I need to do some manual node creation using this converted data. So I do that and use the ConvertNodesValueToXml service to convert these into actual Xml. This works fine except for when the data in one of these nodes contains the & and then I get an error from the ConvertNodesValueToXml service.

Currently, my workaround is to use the replace function to target any '&' and change them to AND because it's unable to handle being changed to &.Shown below:
image.png
This works to change it into something that doesn't make the ConvertNodesValueToXml service throw an error.
image.png
image.png (1.79 KiB) Viewed 202 times
image.png
image.png (1.79 KiB) Viewed 202 times
But I want the data to be inserted into the our table with the & symbol just as it is coming through from JDE. So then when I go to do the insert/upsert I use a replace again to target any of this data with AND and swap it back to & when it's entered into the database.
image.png
image.png (3.93 KiB) Viewed 202 times
image.png
image.png (3.93 KiB) Viewed 202 times
All of this gets me the result that I want in the end but I'm wondering if there is a better way to do this or if this is the only way to handle a situation like this?

Re: Data Manipulation with &

Posted: February 2nd, 2023, 3:57 pm
by CathyC
This might be because xml processing is set to legacy, this is fixed in a later revision with that flag set to current