Length of text in a field

G

Graham

How do I determine the length (or number of characters) of a field?

I want to use something like:

{ IF { = LENGTH( { long_description } ) } > 40
{ short_description } { long_description } }

except that there doesn't seem to be a LENGTH function.

Or I want to be able to use { NUMCHARS } for a small part of text, not the
complete document.

Is there a function? Or a workaround?

Thanks
 
M

macropod

Hi Graham,

Try:
{IF{long_description}= "?????????????????????????????????????????*"
{long_description} {short_description}}

Cheers

--
macropod
[MVP - Microsoft Word]


| How do I determine the length (or number of characters) of a field?
|
| I want to use something like:
|
| { IF { = LENGTH( { long_description } ) } > 40
| { short_description } { long_description } }
|
| except that there doesn't seem to be a LENGTH function.
|
| Or I want to be able to use { NUMCHARS } for a small part of text, not the
| complete document.
|
| Is there a function? Or a workaround?
|
| Thanks
 
G

Graham

And it works well. 41 question marks and an asterisk.
I'm glad I'm not checking a paragraph length.

I put short_description before long_description so it uses the short
description if the long description is too long for my table cell.

Thanks a lot.



Graham said:
Thanks. Nice workaround.


macropod said:
Hi Graham,

Try:
{IF{long_description}= "?????????????????????????????????????????*"
{long_description} {short_description}}

Cheers

--
macropod
[MVP - Microsoft Word]


| How do I determine the length (or number of characters) of a field?
|
| I want to use something like:
|
| { IF { = LENGTH( { long_description } ) } > 40
| { short_description } { long_description } }
|
| except that there doesn't seem to be a LENGTH function.
|
| Or I want to be able to use { NUMCHARS } for a small part of text, not the
| complete document.
|
| Is there a function? Or a workaround?
|
| Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top