2

I've made a python tool that requires the user to establish which state to select within an input's table (the "Prepared Footprint"). However, once the user drops in the layer and tries to write the SQL statement to select the state which is contained in the state field of the Prepared Footprint, there are no available fields to select from.

enter image description here

Is there some option within the properties of the python script tool that will allow the Query Builder to populate the fields and attributes from the input layer like the native Select by Attributes in ArcMap? If not, how might I code this into my source script to feed fields and their attributes to the Query Builder of the "State" parameter?

(experience level with building tools: Beginner)


EDIT: Here's a screenshot of the tool's parameters. When I select "State" and try to change the "Obtained from" paramter property nothing happens. There's no drop down, no cursor, nothing but a highlighted row for "Obtained from". Has anyone ever had this problem before?

enter image description here


EDIT: Found the problem. A "Layer" data type cannot be used as the input for "Obtained from". Feature Layer works instead for this case.

enter image description here

1

1 Answer 1

8

When you define the parameters for your script. For the "State" parameter, you have to set the "obtained from" parameter properties to "Prepared Footprint".

1
  • I see where this option is, but it's not letting me select anything. The "Obtained from" parameter property in the tool Properties is non-editable. Is this possibly a license issue?
    – geominded
    Jan 21, 2014 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.