hanibal
14th October 2008, 09:53
I have a form that have a Range for Sales order ( From...., To....)
and i want to know the script code on how to check each sales order in Range, if it have Text exist.
ARijke
14th October 2008, 16:15
What type of text are you interested in Header text or footer text or both?
Is it Baan IV? Is it LN? in that case replace 040 by 400.
Baan IV:
select tdsls040.*
from tdsls040
where tdsls040.orno inrange :orno.f and :orno.t and
(tdsls040.txta <> 0 or
tdsls040.txtb <> 0)
Regards
zardoz
14th October 2008, 16:18
To check if text exists:
...
and tdsls040.txta <> 0
...
hanibal
15th October 2008, 07:50
well,i work with BAAN V.
ARijke,,thank you for your code,well what i am trying to do is :
To have the ability to define text on a Sales Order Line using the "Text Generation" functionality, but to then be able to apply this text to a range of Sales Order Lines (instead of re-entering the details line by line).
but to take in consideration that i have several departments wich can each of them apply a text to that order.
so the script should be able to check each department for an exist text .
hanibal
15th October 2008, 15:28
i am trying here to make a function wich allow the user to copy an existing text in a sales order to several sales orders headers .
but still not copying.
function extern call.buttom()
if qac2 = tcyesno.yes or pur2 = tcyesno.yes or pla2 = tcyesno.yes
or exp2 = tcyesno.yes or sli2 = tcyesno.yes or shp2 = tcyesno.yes
or ine2 = tcyesno.yes or ini2 = tcyesno.yes or dlv2 = tcyesno.yes
then
start.session(MODAL,"tdgei6402m010", " ", " ")
export("orno.f",orno)
select tdsls400.*
from tdsls400
where tdsls400._index1 = {: orno.f, : orno.t}
selectdo
perform_copytext_multi()
endselect
else message("you should select a department")
endif
}
function perform_copytext_multi()
{
if qac2 = tcyesno.yes and qac1_first = tcyesno.yes then
text_cpy = text.copy("txt_nbr_cpy", "txt_nbr", "QAQC", "", "Internal", strip$(posno) & "/" & strip$(seqno), "", "")
endif
zardoz
15th October 2008, 16:09
After perform_copytext_multi() calling, you have to assign the text number (text_cpy) to the appropriate field of tdsls400, than update the tsdls400 itself.