Select to view content in your preferred language

Arcgis Pro Tasks Operation

1963
4
09-29-2016 02:40 AM
NicolasFaget1
Occasional Contributor

Greetings all,

I need help to work whith Arcgis Pro Tasks.

It is very simple. I want to create a task wich select a feature and zoom over. 

The task does :

  1. input, the user must enter text (copy the text in a variable) and click run
  2. the task does a sql request like "select * from stops where name like '%variable%'"
  3. zoom on the feature selected

I don't know how to do. I can not find an example.

Thanks in advance.

Nicolas

0 Kudos
4 Replies
AmirBar-Maor
Esri Regular Contributor

Hello Nicolas,

This is how to do it:

Step 1- Select by Attributes: set your layer and SQL query to select the features. 

Step 2 - automatic step, set the corresponding layer as selected (must be the only selected layer) and call the command 'Zoom To Selection'

You cannot use a Task variable (e.g. attribute value from user or feature) and insert it into a SQL query.

You can log this as an idea.

Thanks,

Amir

0 Kudos
HNoakes
Esri Contributor

I'm am trying to use a Task variable and pass it into a Python script as a parameter (which I have created as a Geoprocessing Tool for the next step).

I have configured the step to Copy attribute to variable prior to command execution but I can't figure out how to pass the variable into the command. I have tried #variable#, %variable%, !#variable#! etc.

Is this possible?

Thanks,

Heather

AmirBar-Maor
Esri Regular Contributor

Hi Heather

At this moment task variables can only be used as part of a field calculation.

We are considering to expand this in the future

Amir

0 Kudos
LanceKirby2
Frequent Contributor

Hey did you ever get this to work?

0 Kudos