Jump to content

Multiple relationships question


danielrmitchell
 Share

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

Recommended Posts

I have a Customer who has many devices.  Each device has many Services.

 

I want to be able to display Services that are related to the owner of a device in a portal on my Customer layout so thay I do not have to go to my Device layout first.

 

I am having a complete mind-block over this, I know it can be done, I am pretty sure that I covered it while learning to use FM but for the life of me I cannot implement it.

 

Any help please?

Link to comment
Share on other sites

I assume that you have a Services portal on your Devices layout?  If so, copy it and paste it on your Customer layout.  

 

FileMaker evaluates according to context.  So if you have a structure similar to:

 

Customers -< Devices -< Services

 

... then the same portal on Devices to display Services can also be placed on Customers.  Cool beans!

Link to comment
Share on other sites

As LaRetta says, a Services portal will work on the Customer layout as well as the Device layout.

 

Now, if you're wanting to be on a Customer and display Services for a selected Device, that takes a little more doing. A typical method would be to create a global field in the Customer table, e.g. "gSelectedDevice," and make a relationship from that field to a new table occurence of Services. Make a portal based on that. Next, create a button in your Device portal connected to a script that sets gSelectedDevice to the device ID that you clicked. You can probably take it from there.

Link to comment
Share on other sites

This topic is 2927 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.