Okay
  Public Ticket #3427615
foreign keys and editor input types, no multi-value selectbox?
Closed

Comments

  • Alex started the conversation

    Hi..!

    Quoting from your documentation:

    "The only limitation is that the only possible editor input type for those columns is the single-value selectbox, since the options are limited with respect to what the remote table contains."

    Please can you help me and others understand what is this limitation based on? I mean, for the other input types, sure this is obvious, but for multi-value selectbox?

    At least for me it's hard to see the big difference in this context between single and multiple value. Makes things a bit more complex yes, but can't be impossible?

    I bet a large number of users would very much like (even need) to use foreign keys with multi-value selectboxes, this would be a solution for so many different scenarios.

    Let's say I have configured a foreign table relation where I could choose several options when ordering a new car, for example: alloy wheels, tinted windows, parking camera, premium audio system. If only there was the possibility of using multi-value selectbox... with the current limitation I only can choose one option to the order.

    Ok, to be fair, in this particular example we probably would choose to set up separate foreign key columns or just predefined value lists for selecting wheels, audio, camera etc... but often this is not something that can be done and only one column would be preferred.

    A far better example would be when multiple items (similar or different) need to be selected to the order and the total number of selected items can vary greatly.

    So, is this something you just haven't implemented yet or are there some actual big problems or technical limitations preventing it..? In the latter case, I really hope you could take the time to consider could there be a way to accomplish this functionality somehow so it could make it to your feature roadmap.

    Thank you, as always.
    Alex

  •  1,708
    Miloš replied

    Hi Alex,

    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.

    -

    Yes, this is a technical limitation that our Plugin currently has.

    When you make a relation for a Column from another table,

    with our Plugin at the moment we can only make 1 to 1 relations,

    it is not possible to have 1 to many or 'many to many' as you could with a Database Management Tool such as PHPMyadmin for example;

    Our Plugin is not the same as a Database Management Tool,

    all our SQL goes through an SQL Parser which has limitations.

    -

    So, for the time being with the foreign key relations, each value from the foreign table has to be a unique ID for the "store value",

    and for that reason it is not possible.

    But we did have a couple of more users that requested this improvement, so it is definitely planned;

    i just can't say an ETA when it might be 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

    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