Okay
  Public Ticket #3736491
Two Tables lookup
Closed

Comments

  • David Burley started the conversation

    I think we are developing our website leaderboard into something beyond the capabilities of wpdatatables but is it possible to have a proper referential lookup between tables ?

    i.e. our leaderboard has rows with a users name and their score but if they do multiple events they cannot click on their name to see all their results, however if we had two tables as follows:-

    Table 1
    userid / name / username / email address /dob columns

    Table 2

    userid / score / venue / date

    then we could do lookups between the two by referencing the userid, is this possible at all with wpdatatables ?

  •  1,846
    Miloš replied

    Hi David,

    If we understood correctly, the main goal is to create a relation between the tables via a common column ID field - so when Table A row is selected, Table B should load with showing only those filtered rows from the selected row ID of Table A?
    For that use-case, you can use our Master Details feature of Parent > Child table relation.

    If there are multiple possible results in the Child Table, in this case, you can use the 'Send Child Table Data' option via the "GET" method.

     It allows you to display the entire dataset from a child table in a separate table view on a post or page. In this way, you can establish a “One-to-Many” relationship. This means that you can link one row in the parent table to multiple rows in the child table. 


    Please check more details explained on this Documentation with our example tables.

    I hope that helps.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables