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.

1 table - 2 layouts - ? subset relationship

Featured Replies

Hi all,

I'll try to be as succinct as possible. Lets say I have one table, Contacts, and 2 layouts, ContactsLayout, and CustomersLayout. At this point, both layouts are based on the contacts table occurrence.

In the contacts table there is a YesNo field to say whether or not that contact is a customer. I want to display all the contacts on one layout (that's easy) and all the customers on the other layout (that's easy too with a find).

My problem is this... I don't want to use a find to display the customers because if I am on a contact in the contacts layout and i switch to the customers layout, the find resets the pointer from the current record and sets it to the first found customer.

So I was wondering if I could create a subset of one table to another table occurrence with some sort of relationship. That way the pointer would stay on the same record when I switch layouts.

Or do i have to loop through the records to find the current one from the first layout?

Thanks!

Darryl

In the table, create a constant field that auto-enters "YES". Then create a realtionship from that constant to the IsThisACustomer field. Then use a GoTo Related records script to show only the records that were answered "Yes".

Confused? I think I confused myself, but I'm sure someone more articulate can describe this better than I. If it doesn't make sense I can attach an example.

  • Author

Hi and thanks!

Unfortunately, I can't get it to work. I've connected the tables exactly as you have specified. The customers layout seems to get the correct number of records, but it just repeats the first record that many times.

If you could attach a file that would be great!

Thanks again,

Darryl

  • Author

Hi again,

Here's a test file on what I am trying to do. Thanks to anyone that can help.

Darryl

ContactCustomers.fp7.zip

Here is how I would do it.

I only made the changes to the tables & relationship. The layout with the tab control did not make it through.

But, all you should need to do is use the appropriate table.

I hope this works for you.

Bill,

ContactCustomers.fp7.zip

  • Author

Hi,

Thank you for taking the time to look at this.

Unfortunately, I think it's the layout that's giving me the problem. If you base the layout on the global table, then you only get one record. I have tried linking it to global fields, autoenter fields, and I've tried switching around the base tables of the layouts, and using the go to related record, with match all records in the found set on.

Just can't seem to get it working so that you see customers on one layout and contacts on another. As I think I stated above, a find would work easily, except that you won't stay on the same record as you transit from one layout to the other.

Thanks again. Any other ideas?

Darryl

Actually, what I was thinking of was basing the layout on the customer table. The global table is simply there to filter the records of the other table, by only displaying the ones that match the value used in "Global".

Were you intending on using a tab control? If so, it should not be a problem.

Bill

  • Author

Thanks for your help.

Unfortunately, I can't seem to get it to work properly. I guess I will just have to work around it.

Thanks again.

Darryl

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.