qwerty` Posted June 1, 2004 Posted June 1, 2004 Hi, after exploring FMD 7 for almost a month, i decided that it's time for me to get started with the development work. Just 30 minutes into the development work, i faced my first 'obstacle' which made me spend almost the whole day racking my brains trying to think of another way to work things out. I gave up.. hoping to see some light of guidance from the pool of experts here... I have 8 tables here namely employee, leave, dept, sub dept, leave type, manager, public holidays and a global table used to store all the neccessary global attributes. I have attached a copy of my DB design n an example of one of my layout. From the design, u can see that both the leave type and public holiday tables are linked up with the global table. I have the List LeaveType/ PublicHolidays/ Employee/ Department, etc layouts in my .fp7. I wanted to list all records from the relevant table in the layout. Due to the design of my layout, i cant use the normal listing way to list all the records so i do it the portal way (actually i'm not really sure that if it is wise to do it this way ).. i place a gAccount attribute in my LeaveType table, making it a global and auto enter variable. This is to link up with the global table. The List Leave Type Layout is based on the gTable, so that i can use portal to list all the records in leavetype_tb.. this way seems to work fine with both the List Leave Type and Public Holiday tables but for the list dept layout, i cant seems to list all.. onli those depts tat appear in the employee tb which appears in the leave_tb table will be listed. i haf tried some other ways to work round this but nothing seems to work. Hopefully someone here will be able to help mi before i resort to changing my layouts.. sorry if i wasnt very clear in putting my qns.. if there is any unclear part just let me know. I will be happy to make myself clearer.
The Shadow Posted June 1, 2004 Posted June 1, 2004 If you just want all records in your portal you can change the join operator to "X" (cross-product). It doesn't matter what fields you connect, that relationship will always give all records as the result.
bruceR Posted June 1, 2004 Posted June 1, 2004 Impossible. Link only two fields. Select the X operator.
The Shadow Posted June 2, 2004 Posted June 2, 2004 Looking at your DBDesign.jpg, you already have equality joins between: dept -> subDept -> employee -> leave You probably need a new alias of the table on your graph. If you draw a new line from "dept" directly to "leave", FM will create a new alias to the "leave" table, which you can change to use "X".
qwerty` Posted June 3, 2004 Author Posted June 3, 2004 that doesnt work too.. think i should just change my layout.. thanks guys anyway..
bruceR Posted June 3, 2004 Posted June 3, 2004 It is impossible for it not to work if you actually follow the instructions and use an X relationship. See attached. Xrelation.zip
qwerty` Posted June 7, 2004 Author Posted June 7, 2004 I know what you mean but my problem lies here: (based on the example which u have work out) - i have a field in table2 which reference back to a field in table3 - since table2 n table3 r link up, i cant link table3 to the Xrelation table using an X-relation - i cant display all records in table3 actually i have given up on this and tried using another approach but still, it won't hurt to know more things.
ESpringer Posted June 7, 2004 Posted June 7, 2004 Qwerty` Let me add to the list of people insisting that what you want to do is entirely possible. It is hard to learn to use multiple Table Occurrences, but the key to your challenge requires more paths to the same table: multiple TOs. Then make sure you change the identity of the portal to point to this *new* Table Occurrence!
bruceR Posted June 7, 2004 Posted June 7, 2004 qwerty` said: I know what you mean but my problem lies here: (based on the example which u have work out) - i have a field in table2 which reference back to a field in table3 - since table2 n table3 r link up, i cant link table3 to the Xrelation table using an X-relation - i cant display all records in table3 You are saying inconsistent things and it isn't at all clear what you want. You said you want to display ALL records from table 3, and that is exactly what the example does. It is not clear what you think should be different.
Recommended Posts
This topic is 7544 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now