How to join contacts with companies

I have a table companies and a table contacts.
In the table contacts i created a field Companies for relation.

How do I on the company detail page show only the contacts of connected?

Furthermore, the join between the tables is done by name and not by primary key?


Hi there, @anyverse… on the company detail page, do a search for contacts with a constraint on the search where Company equals the company that is being viewed.

About the primary key, the reason you are seeing the company name is because the primary field for the Companies data type (which can be changed by clicking the Primary fields button in your first screenshot) is set to the company name field. It really doesn’t matter what the primary field is set to, but having it set to something like the name instead of the unique ID makes it much easier to work with on the App data tab.

Hope this helps.


Thank for reply, works fine…
Another question, in the contact detail i fill the dropdown from company table but the default value generate an error that I don’t understand

Remove Name from the end of the expression.

Ok is perfect!!
The last question, how should i set the default value of a drop down menu when the value is read from an option set?

I assume you have a field in the Company data type that has a field type of the option set, and you should be able to set the dropdown’s default value to that field for the master group’s company.

Initially I had not created the option field type but only text, now it works correctly!

1 Like