SQLExpression Arcpy Parameter Dependency

652
0
02-25-2019 02:02 AM
JakkapanJiranthorn
New Contributor

Hi guys,

      I have a problem on creating an  ArcPythonToolbox  containing SQL Expression parameter dependency with a TableView parameter (multivalues). I want the  SQL Expression parameter able to retrieve the table names and fields of the input TableView like the Make Query Table tool (a built-in ArcToolbox) but it only retrieve the field names.
Expectation format: MyTable.OBJECTID, MyTable2.NAME
Using ArcGISPro


    My ArcPythonToolbox  

   

       Make Query Table (Expectation)

This is how I bind them.

def getParameterInfo(self):
 """Define parameter definitions"""
 inputData = arcpy.Parameter(
 displayName="Input Data",
 name="in_features",
 datatype="GPTableView",
 direction="Input",
 parameterType="Required",
 multiValue=True)

 sqlExpression = arcpy.Parameter(
 displayName="Expression",
 name="in_expression",
 datatype="GPSQLExpression",
 parameterType="Optional",
 direction="Input")
 sqlExpression.parameterDependencies = [inputData.name]
0 Kudos
0 Replies