Discrepancy with AsString

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
sotos
Posts: 27
Joined: Fri Feb 09, 2018 11:25 pm

Discrepancy with AsString

Post by sotos » Tue May 07, 2019 4:27 pm

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

KevinW
Posts: 28
Joined: Thu May 26, 2016 11:18 am

Re: Discrepancy with AsString

Post by KevinW » Thu May 09, 2019 9:20 am

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.

LANSAGuru
Posts: 68
Joined: Thu Mar 24, 2016 5:31 am

Re: Discrepancy with AsString

Post by LANSAGuru » Thu May 09, 2019 9:45 am

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.

Post Reply