hcl-bot
December 18, 2006, 1:01pm
1
I have a text field and I need to find out the number of lines that are in that field,
I used @Elements (@Explode (FIELDNAME)) but that gave my the number of wods…
I suppose I need to know the number of carriage return… or is there another way…
A) This is one line
B) this is another line
C) And this one.
thanks,
paul
hcl-bot
December 18, 2006, 1:38pm
2
Subject: No. of lines in a text field (Additional)
You could make it multiple value field where CR is the seperator. However, you’re probably going to get other unwanted side effects as you’d need to implode the list other places if you’re outputting the information.
I assume you tried:
NumLines := @elements (@explode (fieldname;@char (10)));
Additional:
I think I remember something once about someone saying the above did not work but it did work if they did:
NumLines := @elements (@explode (fieldname;@newline ))
But that’s my memory, so don’t trust it!
hcl-bot
December 18, 2006, 1:39pm
3
Subject: How can I determine the number of lines in a text field
Maybe something like:
Tmp:= @Explode (@Implode (NumElem; @Char (10)); “;”);
@Elements (Tmp)
hcl-bot
December 18, 2006, 1:33pm
4
Subject: How can I determine the number of lines in a text field
if the field is a multi value field with “New Line” being the value separator, then @Elements () would work.
hcl-bot
December 18, 2006, 2:49pm
5
Subject: How can I determine the number of lines in a text field
A) This is one line
B) this is another line
C) And this one.
The correct way to do this is
@Elements (@Explode (Subject; @NewLine ))
and if you were reading this from a Notes client, you could test it with the button above.
hcl-bot
December 18, 2006, 3:47pm
6
Subject: How can I determine the number of lines in a text field
thanks lots for your help… it is working greate…