Unfortunately, this kind of GUI is not exposed via custom script tools. Your best choice would be to have a list of strings of
MultiValue type and then let user tick the boxes besides the rows to choose records (here is how it can be generated).
The script tool source code:
in_fc = arcpy.GetParameterAsText(0)
in_field = arcpy.GetParameterAsText(1)
in_records = arcpy.GetParameterAsText(2)
for rec in in_records.split(';'):
The ToolValidator class:
"""Modify the values and properties of parameters before internal
validation is performed. This method is called whenever a parameter
has been changed."""
fc = self.params.value
field = self.params.value
with arcpy.da.SearchCursor(fc,field.value) as cur:
self.params.filter.list = [row for row in cur if row is not None]
The GP GUI:
Alternatively, if your end users are savvy enough, you could provide them with an input parameter of SQL Expression type which has the
Obtained from property that makes it possible essentially to replicate the Select By Attributes dialog box in ArcMap.