Page 1 of 1

add a element to a field in the content

Posted: Fri Oct 23, 2015 11:21 pm
by problème
Hello,
I want to know how to add to the first line an element of the content of the field.
for exemple, i have a field which contains :
element1
element2
element3


and i want to add a elementX like this
elementX
element1
element2
element3


and how can I know the line number in the content ?

Re: add a element to a field in the content

Posted: Sat Oct 24, 2015 9:30 am
by jmburnod
Hi,
add to the first line an element of the content of the field

Code: Select all

put myelementx & cr before fld "myField"
and how can I know the line number in the content ?
You can get the num of lines of one fled like this:

Code: Select all

put the num of lines of fld "myField" into tNbLines
and get the lineoffset for one element of fld like this

Code: Select all

put lineoffset(myelementx & cr, fld "myField" & cr)
All works also with variables
Best regards
Jean-Marc

Re: add a element to a field in the content

Posted: Sat Oct 24, 2015 1:52 pm
by problème
Thanks for your help

Re: add a element to a field in the content

Posted: Sat Oct 24, 2015 2:58 pm
by dunbarx
As long as you are learning the keyword "before", why not also look up "after" and "into".

These are critical tools to have in your vocabulary.

Craig Newman