Simplicty and flexibility!


Function::String

Length
Length(TEXT VALUE)
Length("My long text string")
Length(TextField)


The length function counts the number of character positions in a text value.

The length function counts all characters, including leading and trailing spaces.

Parameters


TEXT VALUE

The string that I want to find the length of.

Returns/Result


An integer value.

Examples


Examples

length( "Sapphire International Ltd." )

Returns: 27


length( "Columbus Island" )

Returns: 15


length( COMPANY NAME)

Returns: The number of characters in the COMPANY NAME field for every reco


Reference

 

length

Type

Text Function

Purpose

The length function counts the number of character positions in a text value.

Syntax

length( TEXT VALUE)

Returns

An integer value.

Usage

The length function counts all characters, including leading and trailing spaces.

Examples

length( "Sapphire International Ltd." )

Returns: 27

 

length( "Columbus Island" )

Returns: 15

 

length( COMPANY NAME)

Returns: The number of characters in the COMPANY NAME field for every record that is processed. If the COMPANY NAME field contains the value Club ParaDEASE, Inc., the function returns20.

See Also


MemoLength
MemoWordCount

On the forum about Length

Fill string to length with blanks

I am creating a txt file using the TextOut and textoutln functio and would just like to know if there is a way to fill a field with blank until its length. Ex: Name (defined text 40) value = "Marco"...

Product: DataEase 6.x. Written by Marco 13/11/13 at 10:32:04

Re:Fill string to length with blanks

These functions are CDFs and there might be CDFs that do this but that is outside our "purview".In DE8 there is internal functions for all of this.http://www.dataease.com/dg3_HelpView/?PageID=13698&field1;=*FixedWidth*http://www.da...

Product: Dataease [{8}]FIVE. Written by DataEase 13/11/13 at 10:32:48

export table in a TXT with fixed length

Hi DataEase, we have a problem when we try to export a file into a TXT file that MUST have a fixed length. It means that each fields of the output record have a specific length. It happens that sometimes on some fields DataEase does not respect the le...

Product: Dataease [{8}]FIVE. Written by Marco Marchesi 02/03/15 at 10:49:58

Re:export table in a TXT with fixed length

We are sorry but this is not something that we can test or check out. We take your word for it, but this DQL is pushing the envelop for this functionality....

Product: Dataease [{8}]FIVE. Written by DataEase 02/03/15 at 14:16:23

Re:export table in a TXT with fixed length

Sounds like you have a bug carried over from and introduced in DataEase 7, it's the reason I have 7 databases still on dataease 6.52.  The bug was reported but the old dataease team ignored it.I've not tried it yet in 8 as so far i've just...

Product: Dataease [{8}]FIVE. Written by Simon B 02/03/15 at 14:30:06

Re:Re:export table in a TXT with fixed length

It was a long time ago now so can't look up my findings on the old forum.  It might have been all fields now i think, i think what i found was spaces were added to FIXEd length fields, but not to variable length.  My only historical notes on...

Product: Dataease [{8}]FIVE. Written by Simon B 02/03/15 at 15:12:39

Re:Re:Re:export table in a TXT with fixed length

Simplicity does it. It is no point sending us long DQL's without an application. We need a clue, as we can't replicate every possible and impossible problem.Simons clue gave us a lead, and the export function gets it wrong.Memo is far ou...

Product: Dataease [{8}]FIVE. Written by DataEase 02/03/15 at 19:55:29

Re:Re:Re:Re:export table in a TXT with fixed length

As it is number fields and memo fields that has problems (one way or the other), simply convert them to text before exporting them and they will be fine. The DQL...

Product: Dataease [{8}]FIVE. Written by DataEase 03/03/15 at 08:33:37

Re:Re:Re:Re:Re:export table in a TXT with fixed length

No. My table has only text and numeric string fields. Anyway I've tried to use ToText()on the export-dql also on the numeric string fields but the problems remains unchanged....

Product: Dataease [{8}]FIVE. Written by Marco Marchesi 03/03/15 at 13:50:41

Re:Re:Re:Re:Re:export table in a TXT with fixed length

Mr DataEase: I'm glad I gave you a clue and got you on the right track, even more glad you found it, maybe my memory is better thasn i thought :DMarco: Do what I did back in 2010 and note all fields that are adding a space, then look at th...

Product: Dataease [{8}]FIVE. Written by Simon B 03/03/15 at 14:38:57

Re:Re:Re:Re:Re:export table in a TXT with fixed length

Mr DataEase: I'm glad I gave you a clue and got you on the right track, even more glad you found it, maybe my memory is better thasn i thought :DMarco: Do what I did back in 2010 and note all fields that are adding a space, then look at th...

Product: Dataease [{8}]FIVE. Written by Simon B 03/03/15 at 14:38:57

Length of text field

Good Morning,In DataEase 8.5. When creating a text field, what is the maximum length I can make this field? Is it still 255?...

Product: Dataease [{8}]FIVE. Written by Karen Miller 27/04/17 at 15:25:21

Re:Length of text field

HI.No. The maximum length of a text field is 4080.And the maximum length of a Memo field is 4 Mb.However there are some limitations as most functions in DataEase will only accept arguments of 255 and return a maximum of 25...

Product: Dataease [{8}]FIVE. Written by DataEase 27/04/17 at 15:26:20

Re:Re:Length of text field

On the current form I have 2 fields at 255 each. When I add to the same form a text field of 800 I receive the following dialog box. "This data value...

Product: Dataease [{8}]FIVE. Written by Karen Miller 28/04/17 at 13:57:00

Re:Re:Re:Length of text field

Nobody around here have ever come across this error message ;-)We had the developers dig a little and they say it is basically a Runtime message relating to the wrong value trying to be stored in a field.As you are working with text fi...

Product: Dataease [{8}]FIVE. Written by DataEase 28/04/17 at 14:47:47

Re:Re:Re:Re:Length of text field

I was able to convert 2 text fields (250 each in length) to 1 memo field.  It's great!!!!  However, on another form I have 4 notes fields (all 255 max) that I'd like to put into a memo field.  I've tried everything I can think of to man...

Product: Dataease [{8}]FIVE. Written by Karen Miller 02/05/17 at 18:02:34

Re:Re:Re:Re:Re:Length of text field

Download Sample Hi again Karen. At the moment no function in DataEase can return more than 255 characters. So if you combine 2 fields th...

Product: Dataease [{8}]FIVE. Written by DataEase 08/05/17 at 15:53:41

On the blog about Length

New Function in 8 - MemoLength() - Returns the length of a Memo in characters (Ver. 8.0.0.1128)

Just a simple little function that might be very nice when you start manipulating your Memos.Forget all the negative stuff you have heard about Memos. They are the greatest thing happening to DataEase since Subforms.They had a rough star...

Product: Dataease [{8}]FIVE. Written by DataEase 30/08/12 at 08:23:35


dg3_HelpView