06-19-2012 03:00 PM - edited 03-14-2019 10:04 AM
FYI,
After upgrading from IPCCx 4.x to UCCx 8.5(1) one of my scripts is no longer working (see attached script). I reviewed the errors received and made some changes to the script (see add'l attached script). While the revised script no longer produces the error, the value received for 'Customer Region' is in a format that the script cannot read (ie, U"\n\t\t"). Can anyone help with figuring out why my original script failed to work and why the revised script returns a value in an unrecognizable format? ***Note, AreaCodes.xml file is also attached.
06-19-2012 03:36 PM
Hi all,
While working with TAC I discovered that my original script was hitting the following bug (CSCti89552):
This only confirms that I was on the right path in changing my original script to use a Create XML Document step vs the Create File Document step. TAC is not willing to provide any additional assistance for this issue due to this is considered to be a custom script. Again any assistance will be greatly appreciated.
06-19-2012 07:37 PM
What it's returning, the value U"\n\t\t", means a Unicode string consisting of a newline and two tabs. That so happens to be exactly what's in your XML file for the one child node in each area-code element. Here's an example from your file:
and here-->
The main thing I puzzled over when looking at your script is how this was working before? Are you sure that's your original script? It might be possible to craft an XPath query to return the first node NAME below an area-code element, but I'm not sure how off the top of my head. You're almost always looking for the contents of a node. What I'd suggest you do, if possible, is use a better XML schema. Something like this:
...
Which can then be referenced using a simple fast XPath query like this:
/arearoutes/route[@AC='111']
The result would be what you're looking for today in your Switch statement, a simple string "MidWest" or similar. If you're absolutely married to your old XML schema, we can try to help, but do the above if you can. You might also check out the W3 Schools XPath Tutorial.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide