Hello, again.
I have a table of employees and a table of offices.
On the employee page I want a link to the office where that employee works. The key would be the city. I created a many-to-many relationship but it doesn't ask what the key to that relationship would be.
I could do this with SQL but don't know to make that link with toolset.
Thanks again for your help. You guys have been great!
Jim
Hi Jim,
Thank you for your kind words and I'll be happy to assist.
The way post relationships work in Toolset, you don't have to specify a "key" to connect two posts.
( ref: https://toolset.com/documentation/post-relationships/ )
Based on what you've shared, I'll recommend the following steps:
1. You can create a "one-to-many" post-relationship between the "Offices" post type and the "Employees" post type.
( which means that each office location can have multiple employees )
2. After that, you'll be able to connect the individual office to an individual employee, from the edit screen of both these post types.
( ref: https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/ )
3. Once these connections have been set up, you'll be able to show any information from the related posts (including the post title with the link), on each other's pages.
( ref: https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/ )
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
My issue is resolved now. Thank you!