Hey there, Awesome Customers!

Just a heads up: We'll be taking a breather to celebrate International Workers' Day (May 1st and 2nd - Wednesday and Thursday) and Orthodox Easter from Good Friday (May 3rd) through Easter Monday (May 6th). So, from May 1st to May 6th, our team will be off enjoying some well-deserved downtime.

During this time, our customer support will be running on a smaller crew, but don't worry! We'll still be around to help with any urgent matters, though it might take us a bit longer than usual to get back to you.

We'll be back in action at full throttle on May 7th (Tuesday), ready to tackle your questions and requests with gusto!

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find loads of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel). These gems might just have the answers you're looking for while we're kicking back.

Thanks a bunch for your understanding and support!

Catch you on the flip side!

Warm regards,

TMS

Okay
  Public Ticket #2840849
Custom sorting
Closed

Comments

  • Trace Carlson started the conversation

    On our dimension column, we have options like 1x4, 2x4, 1x6, 1x8, etc. Sorting by this field sorts alpha-numerically which doesn't make sense in lumber so we need to customize the sort order. How can we accomplish this?

  • [deleted] replied

    Hi Trace,

    thank you for reaching out to ussmile.png

    Are you requiring this sorting to be determined by filtering? If so, you can achieve custom sorting only if you enter the values manually, that will show in the drop down menu.

    If you want the table to be shown with a specific order in the column, you can add an integer table, and add the numbers, and set the table to be automatically filtered per that column.

  • Trace Carlson replied

    Hello. What I need is when a user sorts by the dimension column, it is sorted a specific order.

    So instead of sorting the values: (1x6, 1x10, 1x12, 1xRW) the way they are right now, (1x10, 1x12, 1x6, 1xRW), I need to be able to set them in our desired sort order. (1x6, 1x10, 1x12, 1xRW).

    Previously I was able to set a "value|label" pair and was able to sort on the value instead of the label. That is ultimately what I need to do.

  • [deleted] replied

    Hi Trace,

    thank you for the details!smile.png

    I would need to escalate it to my senior colleague to see how can we achieve this; he will contact you back as soon as possible.

  •  2,499
    Aleksandar replied

    Hello Trace.

    Since this is a string-type column, the sorting behavior cannot be changed to suit your needs.

    A workaround in this situation would be to add a new integer column and add an ID to each row, so it corresponds to the sorting you desire to achieve with this column.

    For example:

    4478614564.png

    If I understood correctly, 1 = 1x4; 2 = 2x4; 3 = 1x6; 4 = 1x8, so you can access the settings of this column, and in the Conditional Formatting tab, create a rule for each ID, like this:

    7514886626.png

    The table will use numerical sorting, and it will follow 1, 2, 3, 4... but the content of the column will be displayed like this:

    8881629305.png

    As you can see in the screenshot above, the column SK is sorted in an ascending fashion, and it is showing correct data.

    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