Max Data Length vs exponent notation

Discussion forum about all things Gupta, OpenText and the community.
OeavDev
Austria
Posts: 86
Joined: 15 May 2018, 11:18
Location: Vienna

Max Data Length vs exponent notation

Post by OeavDev » 18 Apr 2019, 07:20

If you set the Max Data Lenght in a number datafield to e.g. "4" you are still able to uccessfully validate a value like "1e10" (10000000000).

Bug or feature?

EDIT - Workaround: ON SAM_Validate, If SalStrLength( SalNumberToStrX( MyValue, 0 ) ) > SalGetMaxDataLength( hWndItem ), Return VALIDATE_Cancel)

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2912
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Max Data Length vs exponent notation

Post by Dave Rabelink » 23 Apr 2019, 10:21

For an unsigned integer of max 4 numeric characters you can also set the Input mask attribute to 9999.
This prevents the user to enter any non numeric characters in the field.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

OeavDev
Austria
Posts: 86
Joined: 15 May 2018, 11:18
Location: Vienna

Re: Max Data Length vs exponent notation

Post by OeavDev » 14 May 2019, 06:59

Thanks. :)

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests