Unsortable Data?

Within my maintenance table, rows can have one of a number of [Status] attached to it. For example "Logged" "Booked" or "Complete"

I am finding some really strange behaviour when trying to sort these into the desired order. Which would be:

Logged > Raised > Pending > In Progress > Booked > Complete > Problem

AppSheet wants to sort them in a somewhat random order, which weirdly isn't even alphabetical. So I've tried all the methods I can think of to solve the problem, including using a VC Switch to numbers, then displaying the correct name, but AppSheet ignores the display name and still shows the number.

The only thing that works for me is attaching a number to the start of each Status, which is ugly and cannot be the only way to fix this.

Can anyone point out the blatantly obvious solution that I'm missing? lol

Solved Solved
0 5 128
1 ACCEPTED SOLUTION

Again, you're not missing anything. AppSheet doesn't make it easy. Here's the best trick I've encountered: https://youtu.be/D1-EVQbp3Ro

View solution in original post

5 REPLIES 5

You may not be missing anything. It can be tedious to accomplish sorting that differs from alphabetical or row order.

If you didn't already consider it: You could make a Statuses table and include a column for the sort order. Then, wherever you need to list statuses in their logical order you can use the ORDERBY function (e.g., in the Valid if expression for the Maintenance table's Status column).

Thanks for your help once again.

Using this method will sort the way the entries appear in a dropdown correctly, but when I use it as a 'Group By' and 'Sort By' when displaying rows existing data, it just goes off and does its own thing. I'm not sure where I'm going wrong.

I'm starting to feel extremely stupid. No matter what I do, it seems AppSheet ignores my attempts to sort the data, and what's worse is I cannot understand the logic it's applying. It's not alphabetical, it's not related to the order in which it appears in the table, it's not based on ancient Sanskrit. 

Still, the only thing that's worked is changing the Statuses to 1. Logged, 2. Raised and so on.

Again, you're not missing anything. AppSheet doesn't make it easy. Here's the best trick I've encountered: https://youtu.be/D1-EVQbp3Ro

This could be great! Except there's no links to what's actually used in the video ๐Ÿ˜‚

I have (finally) managed to figure it out using the Unicode trick, thank you!

The real question is why on earth is this an issue that AppSheet themselves are having to develop workarounds for? Surely AppSheet has been sorting data virtually since its conception, why can we still not do it reliably?

Top Labels in this Space