Tables.order_by of a given search

Hello again! I’m trying to create a button that orders an existing variable app_table search by its “Title”, which is one of its columns.

I tried to save my app_table in a Module in order to access later on from the button like this:
search = app_tables.arte.search(Author=q.full_text_match(input))
Module1.data = search

Then inside the button i tried to get the query and use the tables.order_by() like this:
titleorder = Module1.data
titleorder(tables.order_by(“Title”))

It throws this error:
TypeError: ‘LiveObjectProxy’ object is not callable

How can I use this method (tables.order_by()) for ordering a given search, without creating a new one? Thanks a lot!

Code Sample:

# this is a formatted code snippet.
# paste your code between ``` 

Clone link:
share a copy of your app

The order_by clause must be a parameter in the call to search:

  ... = app_tables.arte.search(
    tables.order_by(“Title”),
    Author=q.full_text_match(input)
)

so postpone that call until you know what all its parameters will be.

4 Likes