learnbaan
21st October 2005, 10:50
hi every one

how to copy purchase order text and generate to new text or no.
my requriment is store histore of quality combination text .

how to use copy.text(...)

please help as soon as posiable

learnbaan

baanbomb
21st October 2005, 10:58
BaanERP Programmers Guide 7.3a


text.copy()

--------------------------------------------------------------------------------

Syntax
long text.copy( string text_field_to(17), string text_field_from(17), string kw1(17), string kw2(17), string kw3(17), string kw4(17), string tgroup(8), string edit_opt(15) )

Description
This makes a copy of the entire text of a specified text field, for all languages, and assigns it a new text number.

Arguments
text_field_to
The name of the new text field. See Text fields: overview. This returns the text number for the new text field.

text_field_from
The name of the text field that must be copied. See Text fields: overview.

kw1 to kw4
Use these arguments to specify key words for the new text. If you specify one or more of these arguments as an empty string, the corresponding key word(s) are copied from the original text. It is possible, for example, to specify two new key words and to copy the other two from the original text.

tgroup
This specifies the name of the text group to which the new text must be assigned. If you specify an empty string here, the text is assigned to the user's default group.

edit_opt
This specifies the type of window in which the text must be displayed.


Return values
>0 success; returns the number of lines copied
-1 error; no permission for this text field;-2 No text copied.
In case of textauthorizations are set to "Use" value of textnumber in variable tm.field.from has been assigned to tm.field.to.

Example
This example copies the text from the text field tttxt008.help to a new text field named tttxt008.docu. A new text number is created for tttxt008.docu and this is returned in the first argument. Key words 1 and 2 are new. Key words 3 and 4 are copied from the original text.

ret=TEXT.COPY("tttxt008.docu", "tttxt008.help", "docu", "help", "",
"", "", "")
Context
3GL library function.

Related topics
Overview
Synopsis

learnbaan
25th October 2005, 07:22
hi all

text.copy not working please help


string san1.text( 13 )
string san2.text( 13 )
san1.text = "tcqms011.txta"
save.text = text.copy("san1.text","san2.text","","","","","","")

error - function text.copy returns an unexpected type

any problem in this code.

learnbaan
25th October 2005, 09:02
select tcqms011.txta
from tcqms011
where tcqms011.quid = :quid.f
selectdo
endselect

if tcqms011.txta > 0 then
save.text = text.copy("new.text","tcqms011.txta",attr.textkw1$,attr.textkw1$,attr.textkw1$,attr.textkw1$,"docu","")
commit.transaction()

endif

thanks