![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've been told to do this: You may want to use the 'R' operator as it returns an exact match. e.g. INVNO = {Something Input} A.CODE = 'A30' ROOT 'SHIP', A.CODE TO ROOT.ID THEN KEY('R', ROOT.ID, INVNO, SHIPID) THEN . ...Do whatever you want here . END ELSE . ...Process error if entered INVNO not found . END END Hope this helps. Bill H. ----------------------------------------- This works, but how do I get the next SHIPID? I can get all the SHIPIDs if I use the 'X' operator, but the problem with this is that it won't do an exact match like the 'R' operator does. How do I get the functionality of both operators in one? Thanks, Danny |
#3
| |||
| |||
|
|
What you want to do is use the "R" operator to find the first hit, then use the "N" to find the next key in the sequence. At each hit, compare with the original key and as long as it's the same, continue processing. For example: kx = invno idx = '' key('r',root.id,kx,idx) then loop process first hit here key('n',root.id,kx,idx) then if kx # invno then exit end else exit repeat end else end Mark Brown |
#4
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |