Data Manipulation with &

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
CameronDouthitt
Posts: 15
Joined: February 10th, 2022, 10:16 am
Contact:

Data Manipulation with &

Unread post 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 200 times
image.png
image.png (2.29 KiB) Viewed 200 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 200 times
image.png
image.png (1.79 KiB) Viewed 200 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 200 times
image.png
image.png (3.93 KiB) Viewed 200 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?
word count: 269

Tags:
CathyC
Posts: 472
Joined: November 16th, 2021, 11:15 am
Contact:

Re: Data Manipulation with &

Unread post 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
word count: 23
Post Reply