Ascending vs Descending Order

captured1

[1st Picture] I have a simple table containing a column named “Gone”. The column keeps 2 possible words; “No” and “Gone”.

[2nd Picture] In UX, setting “Sort by” in “Ascending” order makes “No” come before “Gone”.

[3rd Picture] “Descending” order makes “Gone” come before “No”.

Why are they upside-down?

Regards,

Interesting, if I change “No” to “Not”, AppSheet sorts “Not” and then “Gone” correctly. However, “No” are still down below.

It sounds that the view is trying to be clever and using “No” as FALSE. What column type are you using?

1 Like

Type is “Enum”.
Base Type is “Text”

Regards,

Please check that your column type in the spreadsheet is set as “Plain text”. Now it’s probably set as “Auto”.

1 Like

I just changed it to “Plain text” as your suggestion. However, it does not help.

Regards,

And you synced after that change?

1 Like

To make sure the entire format changing. I did,
-Change column format from “Automatic” to “Plain text”.
-Copy all data in the column to a new file using “Paste values only”.
-Delete all data in the column.
-Copy all data from the new file back to the column using “Paste values only”.
-Open new tab in Chrome and open AppSheet editor.

Nothing changed.

Regards,

@Aleksi

I suspect your column name might be causing a problem. What’s happening when you change the column name like “Gone?”

1 Like

The column name is already “Gone”. And the word “Gone” should not have anything to do with logical processing (it is not “Yes” “No” “True” “False”).

I thought the appsheet might be confusing something as the column name is used as well as value of the same column . So I just said you try to use the other field name . Just even add question mark to the end.

2 Likes

AppSheet interprets the first row to always be column name. This should not fool the AppSheet operation.

Okey I have no more words then.

1 Like

Thanks for your advice. But changing column name may affect the app. So, I try to avoid this.

I tested exactly with your definitions and for me it’s working just fine.

1 Like

This behavior is the same on both the Editor’s emulator & on my Android phone. I have to use “Ascending” as work around.

Is it possible that you have changed the column name slightly and you haven’t changed the column from your View definition?

1 Like

capture

I think I found a clue. If I move the Values upside down to “Gone” and then “No”, the view sorting is correct.

However, the sorting algorithm in AppSheet should not be depend on the order of the Value itself. It should rely on the content inside column, not the sequence of the list.

Regards,

I don’t think so because I created the spreadsheet file with “Gone” column since the beginning.

I tested more deeply and it seems that if the option “Use other values” is not set as ON, it will follow the Enum field’s option called “Values”. Now when you have them as an order No > Gone and that option is set as OFF, this will happen.

1 Like