Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need help in showing all records

Featured Replies

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.

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.

  • Author

i tried that.. but still it doesnt work..

Impossible.

Link only two fields. Select the X operator.

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

  • Author

that doesnt work too.. think i should just change my layout.. crazy.gif

thanks guys anyway.. smile.gif

It is impossible for it not to work if you actually follow the instructions and use an X relationship. See attached.

Xrelation.zip

  • Author

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

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!

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.