pjohns
1st March 2010, 18:54
Hello,
I have an Exchange schema which currently exports records from the item master.
Part of this export includes the price for each item in the item master. For a range of items I need to set the price in the export file to zero. I'm struggling as to what syntax I should use in a condition script to acheive this.
I currently have the following condition script which is taking the price from the tdsls032 table for every item in the export file. How can I change the script to say if the item is in range A to C then enter a zero price?
====================================
table ttiitm001
table ttdsls032
domain tcitem item
domain tcpric pric
domain tcdate tdat
domain tccplt cpls
domain tcpric price
select tdsls032.item, tdsls032.pric
from tdsls032
where (tdsls032.tdat > date.num() or tdsls032.tdat = 0)
and tdsls032.cpls = "001"
and tdsls032.item = :tiitm001.item
selectdo
price = tdsls032.pric
selectempty
price = 0
endselect
return(price)
================================================
Thanks in advance.
PJ - A novice Baan scripter!
I have an Exchange schema which currently exports records from the item master.
Part of this export includes the price for each item in the item master. For a range of items I need to set the price in the export file to zero. I'm struggling as to what syntax I should use in a condition script to acheive this.
I currently have the following condition script which is taking the price from the tdsls032 table for every item in the export file. How can I change the script to say if the item is in range A to C then enter a zero price?
====================================
table ttiitm001
table ttdsls032
domain tcitem item
domain tcpric pric
domain tcdate tdat
domain tccplt cpls
domain tcpric price
select tdsls032.item, tdsls032.pric
from tdsls032
where (tdsls032.tdat > date.num() or tdsls032.tdat = 0)
and tdsls032.cpls = "001"
and tdsls032.item = :tiitm001.item
selectdo
price = tdsls032.pric
selectempty
price = 0
endselect
return(price)
================================================
Thanks in advance.
PJ - A novice Baan scripter!