AnsweredAssumed Answered

How to Programmatically Populate the Schema For a Script Tool SQL Expression Parameter

Question asked by LTS_DSolari on Aug 3, 2018

That title is a mouthful so I'll try and break it down:

 

One of the parameter types for script tools is "SQL Expression". It's effectively a string with a special interface for building a WHERE clause. The schema for this interface is normally populated from a dataset parameter like so:

(pretend I picked a feature class for that "Obtained from" item)

 

This is perfect for dealing with normal ArcGIS datasets. However, this SQL Expression will be passed as a filter to a REST endpoint, which isn't the usual type of dataset. I have to query the table schema from that endpoint to get the field list anyways so building my own "Obtained from" dataset isn't an issue, I just have no idea how to go about this.

Thanks in advance to anyone who can help me crack this case!

Outcomes