• Resolved chadwellyoung

    (@chadwellyoung)


    If you click on the any of the categories to sort them, they are not recognizing 2-9 in the correct order.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter chadwellyoung

    (@chadwellyoung)

    UPDATE: So, I now understand that this is happening due to my using n/a as well as numbers. So, I have added “”columnDefs”: [ { “type”: “formatted-num”, “targets”: [ 0 ] } ]” in the custom code and downloaded and activated the TablePress Extension: DataTables Sorting plugins but it still isnt working.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Unfortunately, your link is not working for me (no IP found in the DNS), so that I can’t check this ??

    Regards,
    Tobias

    Thread Starter chadwellyoung

    (@chadwellyoung)

    Thanks for the reply Tobias. I am working with IT right now to make the webpage public. You could help me with another issue I am having right now. I would like the default sort to be on Column B or 2 instead of the first column. Is there a code I use to override it and where would I add that code?

    Thread Starter chadwellyoung

    (@chadwellyoung)

    Also, when I am importing tables from excel documents sometimes they come over with multiple extra columns that are blank. It has only happened 2 out of 20 times. I am hoping that IT has the website up and running soon. Thanks again.

    The URL (when it’s live) is:
    https://testweb.csg.org/government-proportion-of-women-in-state-legislatures-2018/

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    great! Good to hear that your IT department might be able to help!

    Regarding the sort: How about you sort the table on the “Edit” screen (using the small sort icons that appear in the header row when hovering the mouse pointer over them)?

    Regarding the extra columns: This seems to be an issue in the experimental Excel importer. I recommend to save the table to a CSV file in Excel and them import that into TablePress.

    Regards,
    Tobias

    Thread Starter chadwellyoung

    (@chadwellyoung)

    Thank you so much Tobias. Both of those resolve the issues. I will let you know when IT has the page up and you can help me with the n/a interacting with numbers issue. Thanks again for all your help.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    great! Thanks for the update!

    Best wishes,
    Tobias

    Thread Starter chadwellyoung

    (@chadwellyoung)

    Tobias it should be good to go.

    Here is the table in question:

    https://testweb.csg.org/energy-environment-most-and-least-energy-efficient-states-2017/

    Just to reiterate I have downloaded and activated the TablePress Extension: DataTables Sorting plugins and added ”columnDefs”: [ { “type”: “formatted-num”, “targets”: [ 0 ] } ] into the custom commands function. I found this fix from another thread in the forum. Please let me know if you find anything. You have been MORE than helpful throughout this process. Thanks in advance.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    great! Now I can see the table.

    This issue is indeed caused by the N/A entries. And your “Custom Command” is a step in the right direction. We’ll just have to target the proper columns. For that, can you please try again with

    "columnDefs": [ { "type": "formatted-num", "targets": [ 1, 2, 3 ] } ]
    

    The version of the command then applies the sorting command to the affected second, third, and fourth column (counting the columns in that code starts with 0).

    Regards,
    Tobias

    Thread Starter chadwellyoung

    (@chadwellyoung)

    IT WORKED! Thank you so much Tobias! What is the best way for me to thank you for helping me through these issues?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!
    If you want, you could take a look at https://tablepress.org/donate/ to support future development.

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Number Sorting Not Working’ is closed to new replies.