2010 May 24 9:06 AM
Hi..
I have 2 tables... table1 and table2.
table1 has 3 fields A B C and table 2 has 3 fields D E F ( fields A B E F are primary keys, A = D, B = E )
now i want to display all the fields ie A B C F or D E C F (one and same thing)
i can do this using DB view.. but now user wants to edit the field F in the same view
How can i acheive this scenario, in maintenance view also, we can have just 1 table
please help
Regards
Manu
2010 May 24 10:57 AM
why not create an addon program which using the table control to fulfill this requirement.
if you just want to fullfill this requirement using view.
I think view clauster can make it happy. But you should take some time to see how the view clauster work.
Good luck.
2010 May 25 2:14 AM
Hi,
This is possible.
But, what I did not get to understand is that if you have A = D & B = E, then it would logically mean that there would be only one table with the key fields as A & B while the non-key fields as E & F. That way it would also be easier to maintain.
Whatever, May be you can explain about this scenario later.
Solution to your problem:
1. Your requirement can be fulfilled with Maintenance Views. A maintenance view can have more than one table
2. There should be foreign key relationship between your tables.
Here is how you can achieve it:
Step-1: Create your Table-1 with fields A, B & C
Step-2: Create your Table-2 with field D, E & F
Step-3: Establishment of Foreign key relationship between the two tables
In your Table-2, Define the check table for field D against the field A of Table-1. When you press the foreign key field button, you'll get a popup. In the semantic-attributes of this popup, select Foreign Key field type as KEY FIELDS/CANDIDATES & select the cardinality as 1:1 (in your case).
Perform the similar task for Table-2 Field E and Table-1 Field-B.
STEP-4: Declare a maintenance view. In the tab "Table/Join Conditions", enter the Table-1. Then hit the push-button "Relationships", which is present at the bottom. You'll get a pop-up containing a list of Dependent Tables indicating that Table-2 is dependent on Table-1. Select this entry.
When you do this, your join conditions will be created automatically in the table-control on the right.
STEP-5: Go to the tab "View Fields".
The fields of the Table-1 would be present by default. Hit the push-button "Table Fields", then select the Table-2 & then select only the field F.
This way you can create a maintenance view to maintain the primary & foreign key table simultaneously.
Hope that is helpful to you.
Let me know if you have any queries regarding the same.
Regards,
Saurabh
2010 May 25 2:29 AM
Hi Manu,
As you are saying F is a Key Field.It is not possible to edit Key Filed.
Check your Requirement again .
Thanks
Sai
2010 May 25 11:16 AM
Hi Manu,
Sai is right if the field is a primary key, you cant edit it its logical also right... and if the field is not a primary key it will be in editable mode only...create table maintenance generator for maintenance view...
Hope this helps