Hey there, Awesome Customers!

Just a heads up: We'll be taking a breather to celebrate International Workers' Day (May 1st and 2nd - Wednesday and Thursday) and Orthodox Easter from Good Friday (May 3rd) through Easter Monday (May 6th). So, from May 1st to May 6th, our team will be off enjoying some well-deserved downtime.

During this time, our customer support will be running on a smaller crew, but don't worry! We'll still be around to help with any urgent matters, though it might take us a bit longer than usual to get back to you.

We'll be back in action at full throttle on May 7th (Tuesday), ready to tackle your questions and requests with gusto!

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find loads of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel). These gems might just have the answers you're looking for while we're kicking back.

Thanks a bunch for your understanding and support!

Catch you on the flip side!

Warm regards,

TMS

Okay
  Public Ticket #2609423
column data load from other tables created with wpdatatables
Closed

Comments

  • Emanuele gravela started the conversation

    Hello 

    I created a new data table manually, then I configured my columns and one of them should take data from another wpdatatable column. 

    So I selected column settings_data_use data from another wpdata table _ configure relation, so I selected the table and column and saved, but no data is leaded. I tried it with many different table sources with no success. 


    Then I simply tried to define a value list (see the enclosed picture) and saved, but nothing again! 


    Please help me 

  •  2,498
    Aleksandar replied

    Hello Emanuele

    Thank you for your purchase.

    You probably misunderstood the feature. Foreign Keys are used to pull the values from another table's column when editing. The plugin cannot automatically pull the data from another column.

    The only way you can do that would be to create an integer column, define values in it (1, 2, 3, 4, 5....), and then configure the relation to another column.

    In that case, the way you connected the column (from your screenshot) will not work because you chose the same column to be the store and the display column. Store column should be an integer column to which the IDs you set will be linked to, and the display column will display the data of the chosen column from a row where the store column has an integer.

    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

  •  11
    Issac replied

    Hello, I have been checking on the foreign keys in the website, seems like a lot of users are looking for automatically pull data from another table to current table.

    For example, you have a table called Order and you have a foreign key to Customer. You want to display the customer's first name, last name, and DoB and display them all in Order table. Now, what you can do is manually select them from the dropdown, or a better way (I have not tested but probably will work), is to use the hook to update those values. 

    So this will be what you might see:

    Order table
    ------------------

    wdt_ID | customer_id    |  first_name | last_name | dob
       1023              2                         2                   2             2 


    Customer table
    -------------------------

    wdt_ID  first_name | last_name |       dob 
        2           issac            chua            12/12/1982

  •  2,498
    Aleksandar replied

    Hello Issac

    With built-in features of the plugin, you have two options:

    1. What you mentioned - create the relation, and add the values using drop-downs while editing the table.

    2. Create an Excel table (for example), which will contain the IDs of all columns you want to change using the foreign key feature, like you did in the Order table example. Then, when you import that table, configure the relation, and all numerical values will be replaced with the values from the remote table.

    Of course, you're welcome to use any custom solutions, but that doesn't fall under included support for the plugin. You can add it as a feature suggestion on this page, and hopefully our developers will be able to add it as a built-in option in one of our future updates.

    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

  •  11
    Issac replied

    Hello,

    Thanks for your reply. Well, I am just suggesting a workaround for users how to pull data from other table to your current table as though you are pulling it in sql way. 

    Technically speaking, this should work (haven't tested) but it would be ugly to find all the same foreign key value on multiple columns. 



  •  2,498
    Aleksandar replied

    Thanks for the suggestion, Issac, I will forward it to our development team.

    We definitely have something similar planned for the future, but I can't say when it will be worked on. The idea is to pull data for an entire row based on one foreign key, but that will require a lot of coding hours, and testing, so I don't see this coming in the near future.

    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