monica1
25th August 2004, 10:23
It is possible in a form of type 1 that appears a list of registries of another table. The two tables are related.
For example I want in the session tccom4124s000 that appears the information of session tccom4525m100 but without making zoom.
Any idea?
Thanks,
SriksAdi
25th August 2004, 12:35
Hi,
Yes it is possible.
Try out this functions query.extend.select(), query.extend.from( ), query.extend.where()
This option is not available on Baan IVc4
regards
Sriks
monica1
25th August 2004, 12:40
But how can I show the records in the form?
I don't know how many records I have.
SriksAdi
25th August 2004, 13:00
Add the field, which you want to be displayed on the form , using form editor.
In the before.program section, use the function query.extend.select() to select the field you want to be displayed, and update the "from" list using query.extend.from( ) and in the function query.extend.where() have a join.
Let's say you need to display the Bank Relation from tfcmg001 and then the associated Transaction Type and Description from tfgld011.
Using the function query.extend.select(), extend the list of the field to be selected from the tables :
query.extend.select("tfgld011.ttyp, tfgld011.desc", EXTEND_APPEND)
query.extend.from("tfgld011")
query.extend.where("tfcmg001.ttyp = :tfgld011.ttyp")
In the above example, on the form add the field tfgld011.ttyp, tfgld011.desc.
regards
Sriks
monica1
25th August 2004, 13:20
I want to display the banks associated with a partner. And I have more than one by partner.
SriksAdi
25th August 2004, 14:24
In this case you can go for a mutli-occ+view+main form.
The details of the business partner can be taken as the View field and the banks details in the details.
Have the business partners table as main table.
In the before.program
query.extend.select("tccom025.suno, tccom025.cbad", EXTEND_APPEND)
query.extend.from("tccom025")
query.extend.where("tccom025.suno = tccom020.suno")
regards
Sriks
PS: The table names refer to Baan IVc4 tables. They might have changed in Baan 5.
monica1
25th August 2004, 15:09
It's possible that appears the information of the main table when in the secondary doesn´t exist records?
Tranks,
SriksAdi
25th August 2004, 15:29
It's possible. Refer to Help on SQL Sytax, REFERS TO clause
regards
Sriks
monica1
27th August 2004, 09:54
I try with <from> refers to <to> UNREF <mode> and doen't work
<from>: the secondary table (banks)
<to>: the primary table (partners)
<mode>: I try with all of it.
The session only shows the records with have references with the secondary table. If I have one record without reference don't appear.
Any idea?
Thanks,
SriksAdi
27th August 2004, 10:04
Hi Monica,
Try out CLEARUNREF. This should work.
Prerequisite for REFERS TO is, the tables should have a reference in Data Dictionary.
regards
Sriks