-
-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
order_by
lambda as string fails to update with column name changes
#1353
Comments
Use the |
Thanks for clarifying that However, for this specific bug, |
sort_by
lambda as string fails to update with column name changesorder_by
lambda as string fails to update with column name changes
Yes, it is because We could come up with other alternatives, but those would be more verbose, and perhaps less standard. E.g. Django specifies sort order using a string field name too: https://www.w3schools.com/django/django_queryset_orderby.php. |
Describe the current behavior
If you
sort_by
a column and then change that column name, it doesn't update the name in your sort string. This causes a silent semantic error of nonsensical results.Steps to reproduce
number
column(I completed steps 2-4 for you, resulting in this other document, with just the column's first letter capitalized).
Describe the expected behavior
Grist should update the column reference so that this sorting feature is safe under column renames just like most formulas.
If inputting the formula as a string is just a way to give meaning to the negative sign, then I would argue we should get rid of the negative sign (per #1352). Or, if it is just a hack to access sqlite's own sorting, then I would argue, we should make it work on just a single column. Users can always support more complex logic by adding a custom column with the lambda fucntion they need.
Where have you encountered this bug?
Instance information (when self-hosting only)
No response
The text was updated successfully, but these errors were encountered: