smusba
16th March 2010, 12:02
Dear,

I have a moudule for shrimp processing. in the for field i want to restrict the item whose start position is "3" or "4" and 5th and 6th position are
60,32,33,58 etc.

My sample item code is
3 HGC 60 001001
4HXE 80001008
field.tdsfl102.sitm:
check.input:
select tiitm001.*
from tiitm001
where tiitm001._index1 = {:tdsfl102.sitm}
selectdo
tdsfl102.coop = tiitm001.copr
selectempty
message("Raw Item not found")
set.input.error("")
endselect

if tiitm001.item(5,6;2) = "60" then
message("Donot Enter H/o items")
set.input.error("")
endif

bdittmar
16th March 2010, 12:26
Dear,

I have a moudule for shrimp processing. in the for field i want to restrict the item whose start position is "3" or "4" and 5th and 6th position are
60,32,33,58 etc.

My sample item code is
3 HGC 60 001001
4HXE 80001008
field.tdsfl102.sitm:
check.input:
select tiitm001.*
from tiitm001
where tiitm001._index1 = {:tdsfl102.sitm}
selectdo
tdsfl102.coop = tiitm001.copr
selectempty
message("Raw Item not found")
set.input.error("")
endselect

if tiitm001.item(5,6;2) = "60" then
message("Donot Enter H/o items")
set.input.error("")
endif

Hello,

try:

if ((field(1;1)="3" or field(1;1)="4) and
(field(5;2)="60" or field(5;2)="32" or field(5;2)="33" or field(5;2)="58")) then

Regards

smusba
16th March 2010, 15:08
Your code really worked
Now i want to block also those items whose startpos is 1,2,5,7,9 etc in the same script

bdittmar
16th March 2010, 16:33
Your code really worked
Now i want to block also those items whose startpos is 1,2,5,7,9 etc in the same script

Hello,

is'nt it better to do it in "select from tiitm001" where clause in combination with citg and other fields ?

Are the items in a seperate itemgroup (citg).

field.tdsfl102.sitm:
check.input:
select tiitm001.*
from tiitm001
where tiitm001._index1 = {:tdsfl102.sitm}
and tiitm001.citg = "rawmat"
and ................
selectdo

Otherwise you have to built a matrix to identify.

Regards

smusba
17th March 2010, 09:27
Thanks,


Your logic worked