• Resolved johans

    (@johanselbing)


    I have three tables: Locations, Products and Companies. For the sake of simplicity, each one has an ID and a name column, and Products also has a a column called company_ID. Locations and Products has a many-to-many relationship (via a join table that also includes Amount) and Companies and Products has a one-to-many relationship.

    The idea of the database is that the user per Location can add many different Products that are being manufactured by Companies.

    But, I’ve run into a problem concerning the form builder and lookups. It would be very handy if when a user wants to add a product to a location, also the company name can be seen. If I add a lookup for the Product.ID in the form builder, I can’t access the name of the company, only Product.company_ID and this is not very readable.

    I would like a kind of ‘nested’ lookup possibility; a lookup inside another lookup. Or, another way of structuring the database that would make this possible.

    Thank you for a great plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Kim L

    (@kimmyx)

    Hi @johanselbing,

    Thanks for the post and for using our plugin!

    You should be able to add a lookup to another table on your Product.company_ID field as long as they’re in the Form Builder.

    Could you show us a screenshot of your current setup so we can have a clear view of your use case?

    You can also send us a message via Contact | WP Data Access if you want to share more details privately.

    We’ll wait for your update!

    Thread Starter johans

    (@johanselbing)

    Hi Kim,

    Thank you for the reply. I must have done something wrong specifying the many-to-many relationship, because when I defined it again, everything worked as expected.

    Plugin Contributor Kim L

    (@kimmyx)

    Hi @johanselbing.

    Thanks for the update. We’re glad it’s now working for you. 😊

    Feel free to message us again if you have new questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.