+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

PervasiveSQL len expression stop working


(Sérgio Coelho) #1

Hi,
I have a form which check the number of characters in a table column. If the column had less than 20 characters the form filled with spaces to make 20 cracteres. If the column had more than 20 characters the form returned only 20. It was working properly until the version 19 upgrade. Now the expression is ignored on the form. Here is the code I use:

If ( Len (StkFch.Nome.1) < 20 ,  StkFch.Nome.1 + Rep$ ( " " , 20-Val ( StkFch.Nome.1)) , Left$( StkFch.Nome.1,20) )

Help needed, please.

Thank You


(combit Support - Patrick Preuschoff) #2

Hi Sergio,

thank you for your post.

Could you please check if the blank optimization is active for each column the formula is used? We assume that there might be a performance optimization which is automatically processed by List & Label. Otherwise you can use ‘Chr$(160)’ (non breaking space) instead of the " " (normal space).

Another reason could be, that the field contains a NULL-value. Then your complete formula would (at least by default) result in a NULL-value, too. Please refer to LL_OPTION_NULL_IS_NONDESTRUCTIVE in the programmer’s reference and/or to the NullSafe function in the Designer’s Manual.

Best regards,

Patrick Preuschoff
Technical Support
combit GmbH