• Resolved jheyninck

    (@jheyninck)


    Hi,

    I read through this help page: Advanced lookups | WP Data Access yet fail to create a dynamic lookup filter. Context:

    • I would like to fill a table ‘results’ with 2 fields: a category and a discipline for the result.
    • Since the list of disciplines is long and depends on the category choice, I would like to ensure that the discipline values to choose from are filtered by the category.
    • In the video I notice a lookup relation is created for the grade table with 2 columns (course_id & student_id) to ensure that the courses to select from when entering a new grade have the student subscribed… Identical to my need.
    • When I try the same, I have no option to select a second Target Column name for the category_ID in the disciplines table…

    The only difference I still can see is that I have as ‘Target Table’ a Table, while in the example video a ‘view’ is used.

    –> IF this only is supposed to work with a View, then could you inform me how to make a new view in the database? (as the video does not show this)

    –> IF this should also work with tables, could anyone point me to the missing link?

    Thanks so much,

    Jan

    The page I need help with: [log in to see the link]

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

    (@kimmyx)

    Hi Jan,

    Thanks for the post!

    In the example, a view is used because it had to go through several JOINS in order to get the information needed for the lookup.

    To create a view, go to WP Data Access > Query Builder > Then execute your CREATE VIEW statement.

    Example: https://share.getcloudapp.com/P8uXZ5oB

    Is it possible to share your data model for this Data Project? You can send us a message at Contact | WP Data Access if you wish to share it privately.

    We’ll wait for your response!

    Plugin Contributor Kim L

    (@kimmyx)

    Hi there,

    I’m going to mark this as resolved as we haven’t heard from you in a while.

    Feel free to create a new thread if you have other questions.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Dynamic Lookup Filtering’ is closed to new replies.