Module relationships

I’m trying to understand how module relationships work.

I’m building a module that allows me to input my clients servers & workstations. Basically a client can have multiple servers.

  1. I setup the fields (CPU, RAM etc.)
  2. Added a Relate filed pointing to Accounts
  3. added a Many-to-one relationship. (servers <-many-to-one->accounts)

Now when I create a new server I can associate client. However, when I go to the Account of that customer, I have a server list/panel, but it’s empty.

Any idea why my servers aren’t showing up under my clients name? am I doing relationships wrong?

Thanks!

PS. I haven’t found a module that already does this. I plan on releasing this to the community.

Hi there,

It sounds like you are talking about the flex-relate field, within your custom module Servers. If you enter an account name here, it will not show in the Accounts subpanel as this is a different relationship. If you select a server within the Servers subpanel within Accounts, the server will be related to the Account/client. This is how to utilise the relationship, as the account will have many servers you would add the servers utilising the subpanel.

Thanks,

Will.

So is there a way to allow me to choose the Account from the Server Module? Or do I have to choose the Server from the Account Module?

Thanks!

PS. Any other developers here? you seem to answer all/most questions. I appreciate the hard work :slight_smile: