Is it possible to use a table record as input to a geoprocessing script?

172
1
12-18-2020 04:41 PM
VincentLantaca
New Contributor II

I am trying to create a geoprocessing tool that will allow the user to select records and assign a code to those records. 

 

The records that need to be selected is a polygon feature class. The codes are contained in a separate table (non-spatial table). The polygons will have a field for that code, but it will initially be blank until a code is assigned using the tool.

 

Would it be possible for the user to select records from that table and use that as input for the geoprocessing script? Ideally I would want the user to be able find the code from the attribute table and use that as input.

 

An alternative solution would be do just have the user type in the code as a string and pass that to the geoprocessing script, and then check to make sure that the code is in the table, if not, give an error to the user. This solution is simpler, but the user would have to know the code ahead of time.

 

I have tried playing around with the Query Widget in Web App Builder, but it doesn't seem like I'm able to use the results as input to the geoprocessing tool.

0 Kudos
1 Reply
shaylavi
Esri Contributor

Sounds like you want a dropdown list of all the values from an existing table as an input to choose from.. I don't (and don't think) the geoprocessing widget can do that, but you can definitely do it with some code to read the table and populate an input field.

Shay
0 Kudos