Okay
  Public Ticket #3111219
Is it possible to do this with wpdatatables?
Closed

Comments

  • Christopher started the conversation

    Hello, I would like to know, if I can use the wpDataTables-Addon for my purposes:

    I would like to have a front end form in WP where the user can fill out a form and according to the entries the addon looks up information in certain columns in an imported CSV-File.

    For example: I have a list of 1.000 houses with certain attributes (size, location, year of construction and so on). And on the other hand I would like to have a customer fill out a form, what he or she is looking for. So for example "old house" or "new house", 250 square meters, or rather 500 square meters, "with" garden or "without" and so on.

    So all houses I have in the database are rated according to these categories. Now I would like to show with this addon a raking of the most matching houses according to what the customer has filled out in the form.

    Is that possible to do with this addon? (I presume I will also need a form addon)

    Best regards
    Christopher Stark

  •  2,498
    Aleksandar replied

    Hello Christopher. Thank you for reaching out to us.

    The only way you could achieve something similar is not by having users populate any type of form, but instead by using the Filters which are already a part of wpDataTables.

    So if you have a table that includes all that data in multiple columns, you could have your site visitors filter the columns per these criteria, and then once they filter the table, they'd see the result (a filtered table, showing only what they entered).

    For your use case, it sounds like you'd have to use Cascade Filtering and hide the table before filtering is applied. If you're interested in that, you could also purchase the Powerful Filters add-on (https://wpdatatables.com/powerful-filtering/).

    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

  • Christopher replied

    Hello Aleksandar,

    thank you for the quick answer!

    The filtering will already help to make it work somehow. Is there a way, I can combine it with the calculation functions? https://wpdatatables.com/documentation/table-features/calculation-functions/

    So for example:

    1. The user could filter some results so that Houses 1 to 5 are listet, that match the criteria.
    2. All criteria have a scoring column attached to them in the database
    3. In a second step, the calculation function sums up the all of these values in the scoring columns  and gives a final scoring number


    Something like that could that work? Maybe including some workarounds?

    best regards
    Christopher

  •  1,689
    Miloš replied

    Hi, Christopher 

    Firstly, our sincere apologies for all the waiting time.

    1.

    If you simply add calculation function to columns,  then filtering is going to change Total/Average/Min or Max, for all the columns that have calculation attached to them , for example, if we filter this table from our documentation :

    4729118008.png

    For column Heineken, the original Total is 54, 387 - before filtering, but then if i filter the dates :

    9691532346.png

    Now it is showing the reduced Total, only for filtered rows.

    2.

    If you wish to make  a new Formula/Calculated column, this column can not be added to the database, it will only perform the calculation and present it in the column for that particular table;

    so if you try to pull an SQL query from it - it will not include the Calculated/Formula based Column

    3.

    I am not sure i understood this.

    If you wish to pull , for example, a SUM , or any other calculation from a column, and to use it as part of calculation , in a Formula column, this is currently not possible.

    There are several limitations when using formula columns in wpDataTables:

    1. One formula column cannot be used in another. This limitation can be avoided by using nested calculations.
    2. In tables with server-side processing formula, columns cannot be used for grouping, filtering, and sorting. Basically, formulas are calculated only for the rows that are immediately visible; Therefore, it’s not possible to “know” the values for currently invisible rows. Please note that this also applies to the “Manual” tables, as they also use server-side processing by default. Also, of course, it is not possible to edit the cells generated by formulas in the editable tables.
    3. Adding a sum in the sum row for formula columns is not yet supported.
    4. Using calculation functions in formula columns is not possible

    -

    Let me know how that sounds, and if you have any questions. Thank you

    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