Am I perhaps looking in the wrong place in the documentation? In the Data Tables portion of the documentation it doesn’t show needing anything after “[0]”.
I was under the impression that where it says “tables.order_by(“message”)”, the “message” IS the column name, but that could just be a misunderstanding on my part:
My table name: intro_message
My column name: message
In the documentation (see picture):
Table name: people
Column name: Name
@owen.campbell, I really appreciate your help on this. Thanks to your comments, I now have this working. Can I suggest a small tweak to the Docs? At the top of the Docs page, it shows only one import statement:
from anvil.tables import app_tables
But to get it working for me, it took a second import statement:
import anvil.tables as tables
It might be helpful for other users to include that line as well.
I just checked the order-by example in the docs. import anvil.tables as tables does not appear in that snippet, nor in any snippet above it.
To be fair, Anvil usually inserts that line by default into every module. But it also inserts from anvil.tables import app_tables, and yet that does appear in the snippets.