Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am getting stuck when I want to create a new python script in toolbox. The function I want to develop is to let user to input the user ID, then retrieve from the database the other values to allow user to do the updating. In this case, I want add a "Retrieve" button in the script to allow user to get their details. Please see the following picture of what I want to give.

Is it possible?

enter image description here

share|improve this question

1 Answer 1

This is absolutely possible however you will not be able to add new elements into a GP tool window GUI. Regardless whether you are using Python toolbox or a custom script tool, you will need to look into two concepts:

updateParameters and parameterDependencies (Python toolbox)

Obtained from property of parameters and ToolValidator class (script tool)

For instance, you will be able to get list of fields from a feature class your user will specify. If the standard behaviour of obtaining information of the objects users supply is not enough, consider using ToolValidator class or implementing this logic directly in the Python toolbox.

I would go for a Python toolbox in your case since you will have more options (and imho it is easier to write and maintain the code) in reading the data back based on the input.

Good readings on the question: Are there any distinct advantages of creating a Python Toolbox over a Custom Toolbox?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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