spartacus
31st May 2007, 10:05
We need a display-session, which displays the contents of tfgld102 and tfgld106 in that wise, that there is one line, which displays data either from the first table or from the second, depending on where the data exist, tfgld102 or tfgld106. On the next line the same.
So that the user can see at once in which of both tables the data exists. The solution should be quick and easy, otherwise I will create a session for each table, what is not that nice, but cheap :-(

NPRao
31st May 2007, 10:37
Spartacus,

You reminded me of the good old discussion - Display session based on 2 tables (http://www.baanboard.com/baanboard/showthread.php?t=15349&highlight=MMT)

en@frrom
31st May 2007, 10:38
Hi Spartacus,

I don't know what data you want displayed, but if you want document data for instance, you should consider displaying data from different table, for instance tfgld018 (documents). In this table you have all documents, both finalized and non finalized. Then if you need more data from tfgld102/tfgld106 you can make a subquery to one of those, depending on tfgld018.trun being equal or greater than 0...

If your requirements MUST select straight on tfgld102/tfgld106, then I think the best way is to display variables on the form instead of table field. In your program you do your check, and fill variables from tfgld102 or tfgld106.

As for indicating which table the records are taken from, you can just add a flag for instance 'finalized' which is set to yes if from tfgld106 and to no if tfgld102...

Regarding the performance: if your can query tfgld106 and tfgld106 on indices your performance shouldn't suffer so badly, and the session shall run fast.

Hope this helps. Would be efficient if you filled us in with a bit more details about your requirements and what data you need displayed in that session...

Regards,
Eli Nager

en@frrom
31st May 2007, 10:43
Prashant just posted a minute before me... Of course a report or alternatively a temp table could be useful, but are they necessary...? There is no matter of calculation, summing up record values etc, the only workaround you apply and force the system with, is not displayingthe records of the main table (you can skip.io them easily) and instead display the variables...

Something I don't see here..?

spartacus
31st May 2007, 10:43
Hey Prashant, great!

I will read that stuff.
Besides, regards to your memory. I tried searching: "two tables" and "display session" and always found toooo much ;-)

spartacus
31st May 2007, 11:00
Hi Eli,

when I started this thread I had mentioned that we won't use temp tables or a report. But I removed it, because I would be open for anything.

But in fact, I really can't spend much time for that session. I also thougt about filling variables on a form. But then I have to take care myself about occurences and that things. I think this will be also to expensive. In fact, I think I never created a MOCC session without main-table so that I have to take care about all this things Baan does normaly.

But your proposal with tfgld418 is indeed a very good idea. We will check that against our requirements :-)

Btw: I know that you dislike temp tables where not necessary ;-)

en@frrom
31st May 2007, 11:35
Hehe, indeed I do not like temp tables that much, although I must say I'm a little less stubborn nowadays about it. I must admit I also use them here and there. The only thing is, I only really use a temp table if I have to do very sophisticated calculating, summing etc, which gets extremely problematic in standard display sessions. The big advantage of a temp table is that programming your session is a matter of 15 minutes. Creating the temp table also doesn't take more than that, so all together time wise you're not off so bad. The main thing I have against it, is creating so many extra tables in the database, just for the purpose of displaying some records nicely on screen, rather than spooling it to a report...


Regards,
Eli Nager

Hitesh Shah
1st June 2007, 20:21
Using tfgld018 would only be the way to display records in a syncronized manner . MMT can better organize it in later versions . But displaying fields of tfgld102 and tfgld106 for each occurrence may not be good idea from performance point of view if tables are big. Instead let user select an occurrence , show him the details on mark event . This would be similar tfgld1504m000 session . The only difference would be instead of 3 clicks there would be 1 click for the user. Probably u can re-use Baan's existing 4 display sessions on these 2 tables if u pass the proper arguments .