Okay
  Public Ticket #3684494
foreign keys and multiple remote values
Closed

Comments

  • David Szostek started the conversation

    Hi,


    I have properly connected my table to a foreign key of another table in column "C", where the value of C is the id of the record in the other table. Is there a way for another column (column D) to use the value of Column C to look up different data using the value of Column C in that other table? Basically, I want to have one cell be able to dynamically set the value of other cells. 


    My use case is that I have the user select a company from the company table. I'd then like my other two cells in original table automatically fill the company's "address 1" and "address 2" from the company data's main record in the other table. 


    Thanks!  


  •  1,846
    Miloš replied

    Hi David,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.


    Sorry to disappoint you, but we do not have a way to somehow 'link' multiple foreign Key Column values to 'relate' between each other, such as for example, if you add a new row in an editable Table;


    then pick Column A value for the new row - and for this Table to 'recognise' that from the Foreign Table, the columns B and C should be 'some value' from the same row of the Foreign Table.


    When we edit Foreign Key Columns, each column is treated individually as "one to one relation" and the user must select from all the possible unique values as "Single value Selectbox" from all the respective values coming from that Foreign Table Column.



    You can make a future development suggestion, but I can't say if or when this might become possible.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.


    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