Hi everyone,
I am creating an XML file for deploy it into an external application. In the NAV record, I have a decimal value (Gross Weight (Kg), that I must write it on a node in that XML file.
I am using this for adding to the node:
lvl5XMlNode := XMLDocOut.createNode(1,'TOTALWEIGHT','');
lvl4XMlNode.appendChild(lvl5XMlNode);
PackingHeader.CALCFIELDS("Gross Weight (Kg)");
DomTextNode := XMLDocOut.createTextNode(FORMAT(PackingHeader."Gross Weight (Kg)"));
lvl5XMlNode.appendChild(DomTextNode);
I am formating to a text tyope, because the node as to be a text, but when processing the XML file in the external application, I see this error:
TOTALWEIGHT specified must be numeric
How can I use the format expression to generate a numeric node?
Thank you very much!
Answers
Yury
Thank you, I'll take care of it.
All you need is:
Thanks, It worked perfectly, and it's simpler than my solution.
Really thanks!