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
  • Some clarification, after testing further this sytax does convert the value to integer...
    tointeger(if( (xpathsnippet(pv!accountResponseBody_Txt, "//*[local-name(.)='AccountNumber']/text()")) = "", "", xpathsnippet(pv!accountResponseBody_Txt, "//*[local-name(.)='AccountNumber']/text()") ))

    The only problem remaining is that it only converts the first value in the pv array. There are several account number values in the XML response.
Reply
  • Some clarification, after testing further this sytax does convert the value to integer...
    tointeger(if( (xpathsnippet(pv!accountResponseBody_Txt, "//*[local-name(.)='AccountNumber']/text()")) = "", "", xpathsnippet(pv!accountResponseBody_Txt, "//*[local-name(.)='AccountNumber']/text()") ))

    The only problem remaining is that it only converts the first value in the pv array. There are several account number values in the XML response.
Children
No Data