A table values zeros as the lowest number when sorting by column

Trying to sort a table by a numeric column results in zero values to be valued as the lowest, even lower than any negative values.
This doesn't change even if you set the column type to number or currency nor when you toggle the option "Sort by mapped value" on and off.

Hello,

I'm not sure the use case behind this, however, it's possible to do. Hopefully someone else has a more elegant solution than what i'm proposing below.

  1. You need to hardcode a negative value that you KNOW your data won't reach.
  2. Mapped value so that it displays 0 when equals to value in #1
  3. Turn off sort by mapped value

The issues here are:

  1. The use case is trying to sort something that is not normal. Zero sits in the middle of positive and negative, so Retool is sorting correctly.
  2. There is no option to inject a custom sorting logic.

Hope that helps,

In my case, I sort my table by a numeric column, that I turned into type currency in ascending order.
However, it starts with all the zeros, then continues with the actual lowest value of the data

image
and later it goes from negative to positives.

I want the zeros to be sorted between the negatives and positives, as it should normally be.
But as you can see, it does not.

I see, my apologies I understood the opposite of what you're asking.

1 Like

I tried to replicate it on my end (cloud instance) and not able to. Would you able to post the json of your app?

1 Like

Hi @seppi

Can you also let us know what version you are on? It looks like this was a bug that has been fixed for cloud, but it is still impacting on-premise accounts. If you're using an on-premise/self hosted account, the fix should be coming soon!


If you're on Cloud, which always has the latest version, then I agree with @lamh_bytecode.io It would be great to see a json of the app, if possible.