How to handle double or long Number datatype received from another web service into Appian

Certified Senior Developer

We call the web service and received the response which contains attributes named as "alternativeNumber":9230045581 and when we parse the response using a!fromJson() , We loose the alternativeNumber value which will get as null after parsing using a!fromJson() because Appian Number data type have limited range , so we could not able to perform any further operation on it because we first need to parse/retrieve value of it successfully.

Although We are handling data using CDT of type Text for "alternativeNumber" and can perform operations later only after if we successfully retrieve from response.

 

Any suggestions without altering web service parameter type will be helpful.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

     I could able to do it using a!jsonpath() function which can be applied to json string formatted data .
    load(
    local!webserviceresult: rule!getServiceCall(7366633)
    local!result: a!jsonPath(
    local!webserviceresult,
    "alternateNumber"
    ),
    local!result
    )

    If you need to access nested data of same long number data type , you can call like a!jsonPath(a!jsonPath("JsonStrings","attributeparent"),"attributechild")

    You need to make sure destination datatype need to set as Text.

Reply
  • 0
    Certified Senior Developer

     I could able to do it using a!jsonpath() function which can be applied to json string formatted data .
    load(
    local!webserviceresult: rule!getServiceCall(7366633)
    local!result: a!jsonPath(
    local!webserviceresult,
    "alternateNumber"
    ),
    local!result
    )

    If you need to access nested data of same long number data type , you can call like a!jsonPath(a!jsonPath("JsonStrings","attributeparent"),"attributechild")

    You need to make sure destination datatype need to set as Text.

Children
No Data