Trying to set a filter on a Python toolbox parameter to only allow tables to be input.
Currently doing this:
param0 = arcpy.Parameter(
displayName="Table",
name="in_Table",
datatype="GPTableView",
parameterType="Required",
direction="Input")
param0.filter.list = ["Table"]
However, the filter doesn't seem to work.
the parameter list looks like the correct form (ie a list of entries)
which begs the question, about 'Table' being the appropriate entry
I don't believe filters are valid on GPTableView parameters. Your best bet might be to use Describe in the UpdateMessages method to check whether it's actually a table or table view, then raise an error if it isn't.
Thanks guys. I figured this was probably something that was implemented but wanted to check with the SMEs to make sure I wasn't missing something. Boo, Esri. Fix it. https://community.esri.com/ideas/14090