We're Moving to a New Support Platform – Starting June 1st!
We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.
You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.
While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.
We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.
Thanks for your continued support and trust – we’re excited to bring you an even better support experience!
Perhaps I'm missing something - but is there a simple way to display row numbers? I'm running an SQL query that pulls a list of sales by sales reps. Then it sums the sales by each rep and groups the result into a total sales column that is sorted by DESC. Thus creating a sales leaderboard.
But I can't find a way to add a row number (index) of the result so you see the place of the sales rep - i.e. 1st place, 2nd place, etc.
Seems like this basic function is missing:
ROW_NUMBER() OVER(ORDER BY name) AS num_row
Hi ,Jay.
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.
-
Unfortunately, adding row numbers to tables is not possible with our built-in features.
The front-end (JS) part of wpDataTables plays a significant role in the plugin’s functionality. Generally, front-end rendering is done by the DataTables jQuery plugin
All wpDataTables existing on the page are reflected in the global JavaScript object called ‘wpDataTables‘. If you check this variable in the JS developer console you will see the wpDataTables as properties of this object.
-
I have a custom workaround with a bit of JS that you can try, though.
First you will add a first empty column at the beginning of the table and i will show you a JS script you can use, then it will always show fixed row numbers in this column , starting from 1 and so on.
-
This script will check if there is a table on the page, and if there is - it will add the row numbers, fixed from 1 > until the last row.
If you change the sorting, filtering, that first column will always have fixed numbers.
The front-end (JS) part of wpDataTables plays a significant role in the plugin’s functionality. Generally, front-end rendering is done by the DataTables jQuery plugin
All wpDataTables existing on the page are reflected in the global JavaScript object called ‘wpDataTables‘. If you check this variable in the JS developer console you will see the wpDataTables as properties of this object.
-
Here are the instructions to make this workaround.
First add one column in your file or data source at the start of the table (as first column),
Then we will use this JS code.
I added this in my plugin settings/Custom Js and CSS/Custom JS :
You can try either to add it the same way in the plugin's Custom JS ,
or if you wish to add it directly to WP page(s) , add it wrapped in <script></script> tags as Custom HTML in your page builder.
Let me know if that helps, it should work.
Thank you.
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 | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Thanks for this - I realized since I only need to display row numbers (not do anything with them) I just added the blank column and use the :before css selector to insert the numbers I needed. :-)
P.S. I added a feature request for a progress bar/thermometer display. Might be handy for some people!