Jump to content

Need help in showing all records


qwerty`
 Share

This topic is 6433 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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... frown.gif

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 blush.gif).. 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.

Link to comment
Share on other sites

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".

Link to comment
Share on other sites

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. smirk.gif

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 6433 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.