alexpreyer
14th September 2009, 15:21
I'm working on a new session and have been trying to find a solution for two days now.
Background:
We have a machinery tools session consisting 3 tables:
1. Header (for each tool) - index: toolnr.
2. Toolparts (Parts needed to build the tool) - index: toolpartnr.
3. Partslist - describes which toolparts needed for a tool - Fields (toolnr., toolpartnr., position)

I need a maintain session (multiocc) where I get a list of all toolparts for a special tool. This list I want to maintain. So at the beginning I select a toolnr and based on the toolnr I get shown alle toolparts needed for this tool and can maintain them. Unfortunatelly I need the third table to know which toolparts are needed for the selected tool.

I tried query.extension, but failed. After selecting a toolnr. I need an select statement to get all records from the toolparts-table. But I couldn't get a query.extension run with an selectstatment in.

Hope someone has an idea. Also hope my description shows what I mean.

Thanks

Alex

frigyesg
14th September 2009, 16:54
Instead of using query.estension you could try the following way:

main.table.io:
after.read:
select some.table
from some.table
where ...
selcetdo
if your.condition ... then
skip.io("")
endif
endselect

alexpreyer
14th September 2009, 17:02
First, thanks for your reply.

This will not work.
Tables:
tizzz401 - toolparts
tizzz402 - linktable between tool and toolparts

The user enters a toolsnr. So first I have to look in tizzz402 which parts are used for the tool (from this query I get the toolspartnumbers). And now I can filter the tizzz401 which will be maintained. So I have not only one criteria for the if-clause.

Thanks anyway