Okay
  Public Ticket #2613822
Relational tables
Closed

Comments

  • Elena started the conversation

    Hi, I found your plugin and the demo seems to be almost perfect for my project. I read the documentation about foreign key tables and I can't find out if it's possible to populate one column with data from another table related to the ID both tables have. You can see in the picture attached. I know that I can open a select box with the list of names related to another table, but what I need is that the column Customer name in the second table fills automatically (or show me only the value linked with the Customer ID in the select box). Is that possible? Thank you.

  •  2,572
    Aleksandar replied

    Hello Elena

    Thank you for your interest in our plugin.

    I am sorry to disappoint you, but unfortunately something like this is not possible with the plugin's built-in features.

    The foreign key only creates the connection, but you need to manually assign the items through the select-box editor.

    The only way to make them populate automatically would be to have an Excel table prepared, where the Name will be an integer column, with predefined data - meaning you should already know which name belongs to which ID in the foreign table. When that table is imported into wpDataTables, you would change the type from integer to String, set up the foreign key relation, and the data would be automatically filled.

    However, if you add new data to the source table, it will not be pulled into this table automatically.

    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