Skip to Content
0
Former Member
Oct 23, 2006 at 09:43 PM

Identifying the length of populated field

30 Views

Hello,

I'm sure there is a simple answer to my question, but I don't it..

I have a character field in my selection screen which is 7 characters long. When the user runs the report, he/she enters some value in the field; the value entered could be 7 characters or could be empty, or any number of characters in between.

As part of my report I want to calculate how many characters the user has entered. For example:

If he/she entered 'RD3' I want to do some special functions since only three characters are available;

If the user entered 'WD3TW' then I would perform some other functions, since five characters are available to me.

I've tried the "contains pattern" (CP) string function, but with no luck. The DESCRIBE always results in 7, since the that's the field's length.

Does anyone know of a way to calculate how much of a field is populated?

Thanks