keith_k

Trouble using Lua function action.filter() without args

Discussion created by keith_k on Jun 11, 2009
Latest reply on Jun 12, 2009 by keith_k
According to the documentation, the action.filter() function in the NAS should return a list of filters if it is called without any arguments.  I wanted to see this in action, but it does not appear to be working.  I am testing from the script editor in the NAS GUI.  Here is my script as it stands right now:
filters = action.filter()

print(type(filters))
print("Found "..#filters.." filters")
Here is the output:
table
Found 0 filters
Originally I was getting a nil, but I have a feeling I may have had a typo in the first line.  When I started getting a table back, I thought I was all set, but the table is empty.

Hopefully my 3 lines of script are free of obvious errors, but can anyone tell me if I am doing something wrong?  Or is there some trick to using the action.filter() function to get a list?

Thanks,
Keith

Outcomes