ken bohnenkamp
8th November 2002, 18:26
I have a type 1 form that has a po-number on it. I want to zoom to a type 2 po detail form and only show the po-detail records that relate to the po-number on the type 1 form. I do not want to use skip.io in the after read of the type 2 po-detail form because I only want to read records from the po-detail table that relate to the po-number on the type 1 header form. I realize that I must first pass the po-number from the type 1 header form to the type 2 po-detail form, but then what kind of logic do I use to read the specific po-detail records (for the passed po-number) and where do I put this logic. Any help would be appreciated.
lbencic
8th November 2002, 18:57
I am confused why skip.io will not work for you. If you import the po number you need, and in the after read section you skip.io for those that do not match your po number...does that not work?
You may also try the query extension in the before program:
before.program:
query.extention = "tdpur041.orno = :tdpur040.orno"
query.extension should be used instead of after.read/skip.io because of efficency.
ken bohnenkamp
8th November 2002, 21:10
I added the query extension for the where and it worked great.
query.extension = "arcom003._index2 = {:passed.child.pnum}"
I also want to order the records using order by. I added the following code and I get syntax errors.
query.extension = "arcom003._index2 = {:passed.child.pnum}"
query.extension = "order by arcom002.clda"
What does the syntax look like to order your records.
lbencic
8th November 2002, 22:17
The 'order by' is indicated in Maintain Sessions - Change Key button, and you designate which index is #1 and which other indexes are allowed in the session. You can only sort by a main table index.
In Baan IV, you are allowed only to extend the 'Where' portion of the standard session's Select statement. In Baan V, you can extend the 'Select', 'From' and 'Where' clauses. You cannot extend the 'order by' clause in either that I know of.