Page 1 of 1

Discrepancy with AsString

Posted: Tue May 07, 2019 4:27 pm
by sotos
Hello,

I have a decimal field named #WEBA_ORDERANOUNT with length 15 and 2 decimals.

The problem is that #orderAmount.AsString and #WEBA_ORDERANOUNT.AsString gives different values

i.e. (within a server module):

Define_Com Class(#WEBA_ORDERANOUNT) Name(#orderAmount)
#orderAmount = 0.20
#orderAmount.AsString -> 0.2

--------------------------------------

#WEBA_ORDERANOUNT := 0.20
#WEBA_ORDERANOUNT.AsString -> 0.20

Why is this happening, I was expecting identical results.

cheers,
Sotiris

Re: Discrepancy with AsString

Posted: Thu May 09, 2019 9:20 am
by KevinW
Hi,

Please report this to your local LANSA support, with LANSA version and EPC info and complete samples that show the issue for faster results.

Re: Discrepancy with AsString

Posted: Thu May 09, 2019 9:45 am
by LANSAGuru
I suspect this is because the define com is simply inheriting the field type and not the edit code attached to the field.

How are you determining what the field is?
Debug?

Or are you sending both fields back and viewing the json output?

Or are you going by what is showing up on a screen in the browser?

What does the field definition look like?

This might not actually be a bug, just a misunderstanding of how rdmlx works (or not).

A reproducible example (quick export with field definition) is not a bad idea...allow the devs to export the reasons.