Query for checking if a multilink column is an empty list

I’m trying to search a column in a data table to test if it is an EMPTY LIST
the column is a multilink column to another table.

but I can’t seem to get it to work nicely…

I typically get this error


anvil.tables.TableError: Column 'multilink' can only be searched with a liveObjectArray (not a Unresolved (empty list)) in table 'Table 0'

setup:

table_0: #muiltilink column to table_1

workaround:


empty_rows = app_tables.table_0.search(multilink=q.none_of([[r] for r in app_tables.table_1.search()]))
# this seems obtuse to me - especially if both tables are sizeable...

what fails


# this gives the error
empty_rows = app_tables.table_0.search(multilink=q.all_of([None]))

# this doesn't work
empty_rows = app_tables.table_0.search(multilink=[])

clone link if you want to try
https://anvil.works/build#clone:IPHE4COIUTIAK52Q=CMKUI3KADD5YGBUE2FMU5TMH

I am having the same issue.

1 Like

Hi @stucork did you find any solution?

I’m having a similar issue.

I have a multilink column linked to user table,
#this gives me the rows relevant to the user
user_rows = app_tables.table_0.search(multilink=[user])

#i need to show empty rows to all users
so i need another query to find empty rows and combine both queries to get the final result.

any help is appreciated!