JRussell
7th November 2002, 13:32
Hi,
I am trying to limit the display of records. I have a session (A) where I select a value for a field. Depending on this field I want only those records that have this field as part of its index to be displayed.
Eg.
Session (A)parent
fieldA=machine
Session (B) child
display recs where "machine" equals part of the index.
The index has two parts: Machine Element,Reason code.
I export the value of machine to the child session(B). However I am unsure how to handle searching the child table to get the right results.
EG of data in child:
Machine Element, Reason, Desc
Mc1, R1, Mc1r1 combo
Mc1, R2, Mc1r2 combo
Mc2, R1, Mc2r1 combo
So if I enter "mc2" in parent session, I only want the Mc2 R1 combo record displayed.
My select statement looks like this:
select wawti712.*
from wawti712
where wawti712.mcelem = :mcelement
and (wawti712.reasonco >= "aaa") OR (wawti712.reasonco <="zzz")
selectdo
endselect
The correct recs are not selected and displayed because of the reason part of the index I think
Can anyone advise?
Thanks
I am trying to limit the display of records. I have a session (A) where I select a value for a field. Depending on this field I want only those records that have this field as part of its index to be displayed.
Eg.
Session (A)parent
fieldA=machine
Session (B) child
display recs where "machine" equals part of the index.
The index has two parts: Machine Element,Reason code.
I export the value of machine to the child session(B). However I am unsure how to handle searching the child table to get the right results.
EG of data in child:
Machine Element, Reason, Desc
Mc1, R1, Mc1r1 combo
Mc1, R2, Mc1r2 combo
Mc2, R1, Mc2r1 combo
So if I enter "mc2" in parent session, I only want the Mc2 R1 combo record displayed.
My select statement looks like this:
select wawti712.*
from wawti712
where wawti712.mcelem = :mcelement
and (wawti712.reasonco >= "aaa") OR (wawti712.reasonco <="zzz")
selectdo
endselect
The correct recs are not selected and displayed because of the reason part of the index I think
Can anyone advise?
Thanks