ImportJson changing Numerical value
- New
- How-to
-
Rinku Karda
- PowerBuilder
- Thursday, 26 June 2025 12:30 AM UTC
Hi Again,
Need your assistance pls.
I am fetching the result of API execution to String, and importing the Json string to Datawindow as below:
String ls_api_output
napi = create n_api
ls_api_output = napi.of_apicall( ls_url, ls_json , as_rspname, ls_responce_name, ls_container, ls_json_frmt , ls_json_table , ls_client_id, ls_client_secret_id, ls_hmtd)
Dw_1.importjson( ls_api_output,Primary!)
the ls_api_output returing below:
{"NME":"EX1","EOC_ORG_ENT_ID":123445,"NME2":"TEST","PAY_DT":"09/01/2022","PAYROLL_DSC":"TEST PAID","RMIT_CTRL_ID":123445,"TOTAL_REC_CNT":376653,"TOTAL_AMT":923151801.1}
But when we are displaying the Dw_1. the numeric decimal value 923151801.1 changing to 923151808.00, some other records are also changing (rounding), but I want to preserve the same value only, not rounding up, same value with same precision, could you please suggest if I need to change some settings? or how can I restrict it.
The column is defined in Datawindow as Decimal(2).
Thanks in advance.
Regards,
Rinku
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.