We're Moving to a New Support Platform – Starting June 1st!

We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.

You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.

While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.

We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.

Thanks for your continued support and trust – we’re excited to bring you an even better support experience!

Okay
  Public Ticket #1988044
foreign key
Closed

Comments

  • HPPraxis started the conversation

    I want to build a students gradebook.
    To test the functionality of wp datatables I created two tables:

    Table 1 basic data:  name, class, firdt name, mail
    Table 2 grades: name, form, mark1...

    I want to get the data "name" and "class" from table 1 into table 2 by connecting the colums but it doesn´t work. I followed your instruction guide and your video of using foreign key (I tried the example - ok).

    Why do I fail? Did I get something wrong?
    Do you have more ressources and examples of combining tables?


  •  2,576
    Aleksandar replied

    Hey HPPraxis.

    Thank you for your purchase.

    Do you have a unique ID for each row? As you had the chance to see in our documentation, it is being used as a store value.

    Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    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

  •   HPPraxis replied privately
  •   HPPraxis replied privately
  •   HPPraxis replied privately
  •  2,576
    Aleksandar replied

    Hello HPPraxis.

    I don't believe it's a good practice to use the wdt_ID column for Foreign keys.

    Please take a look at the attached screenshots. You can see that the last two in [wpdatatable id=24] don't match up with [wpdatatable id=19].

    If you enable editing for a column configured as a foreign key and you choose a single-value selectbox as an editor input type, editing will work naturally, and the IDs will be stored in the column.

    Unfortunately, wdt_ID is a unique auto-increment integer column, and therefore cannot  be used properly for a foreign key, since upon each new row it is adding a new value, and even if you pass the correct data for other columns it will not be recognized as a store value column, until (like you said) you add it manually.

    Best regards.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    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