flequi19
Member
Posted 1 year ago #
Hello, I wanted to know if there is a way within the code to show in a row the total ammount of rows there are on my table, if there is a variable that counts the row's total and that later on can do sums and subtraction with that total.... thanks in advance
Martin
Hi Martin,
thanks for your question.
Unfortunately, there's no such variable available currently, and there's also no possibility to do sums or substractions (or calculations in general) with table data.
This is out of scope of the plugin, therefore I suggest to use a spreadsheet application (like Excel) for something like that. Then, export the table to CSV and import it into the plugin.
Best wishes,
Tobias
K@PJlCoH
Member
Posted 1 year ago #
Hello, at once sorry for my English, I work over it :)
I asked for a long time this question, but and haven't found the answer though very much I need similar function too.
Not absolutely I understand in what complexity of realization for the person created plugin WP-Table Reloader. After all you already used similar technology in the admin panel of a plug-in and in the bottom of tables at searches is counted up and the quantity of records is deduced.
I think, such possibility will be useful to much, and I in turn wouldn't regret generous donate for you :)
Best wishes,
Karlson.
Hi Karlson,
thanks for your reply.
You are right, there are places where the number of rows is visible already. Those are however done in different ways and making them available for usage inside tables is not that easy.
I could imagine that a Shortcode could work for the total number of rows, but even that would be limited, as it could never work together with other features of the plugin, like the filtering extension or certain other parameters.
It would also not have any calculation capabilities - and implementing those is basically impossible for me, as it requires a parser for mathematical expressions.
Therefore, the best solution for this might be to use some own JavaScript code. With that, you could simply count the number of rows in the table HTML and add it where you want, and even do calculations with it. By the way, this would be a very similar solution to the second screenshot you posted (which shows the information on the table that the DataTables JavaScript library gathers).
Best wishes,
Tobias