I have an XML response that returns a text data type however, the CDT in which I

I have an XML response that returns a text data type however, the CDT in which I need to save the response values requires this field be an integer. How would I go about converting this value from text to integer?

XML Response value is text data type: AvailableBalance
if( (xpathsnippet(pv!accountResponseBody_Txt, "//*[local-name(.)='AccountNumber']/text()")) = "", "", xpathsnippet(pv!accountResponseBody_Txt, "//*[local-name(.)='AccountNumber']/text()") )

Need to convert this specific field to integer in multiple PV array....

OriginalPostID-60769

OriginalPostID-60769

  Discussion posts and replies are publicly visible

Parents
  • I would expect both the first and second things you pasted to work. Depending on what "it doesn't work" means, there are different ways to debug.

    I would start with confirming the actual type of the result of your expression. You can use the typename() and runtimetypeof() expressions for that. typename(runtimetypeof(<your whole expression>)) will tell you if you're actually getting an integer back or a string.
Reply
  • I would expect both the first and second things you pasted to work. Depending on what "it doesn't work" means, there are different ways to debug.

    I would start with confirming the actual type of the result of your expression. You can use the typename() and runtimetypeof() expressions for that. typename(runtimetypeof(<your whole expression>)) will tell you if you're actually getting an integer back or a string.
Children
No Data