1

These following external commands are not working at all when i try to find a feature set thru SQL non-query and then want them to zoom or highlight in Geocortex Essentials Workflow. (Run External command utility)

  • HighlightESRIFeatureSet
  • ZoomToESRIFeatureSet
  • ZoomToFeatures

The Geocortex SDK API Reference for HTML 5 viewer 2.5 displays the above commands as part of it.

But nothing happens over map. Any idea?

1

There are a couple of problems that you're maybe running into. I was able to get HighlightEsriFeatureSet working through a RunExternalCommand activity in Geocortex Workflow, but not ZoomToEsriFeatureSet. Not sure why the zoom didn't do anything but zooming to the extent of a feature set is easily accomplished using an alternate approach (Get Feature Set Extent, then Zoom To Extent).

You may not be able to get HighlightEsriFeatureSet working for a couple of reasons:

  1. you are executing HighlightESRIFeatureSet (it's case sensitive)
  2. you are not supplying a valid Esri FeatureSet to the command

The first is easy enough to verify. If the correct case still doesn't work, you can look at what you're supplying to the command. You mention a "SQL non-query" which I'm not sure is correct...since that doesn't give anything useful back (it's for updates, deletes, inserts - not queries). You may be using a SQLQuery activity instead but that even will be problematic since it returns a data table from a standard database query. OK, you can convert a data table to an Esri feature set in Workflow...but that feature set almost certainly won't have any spatial information so nothing to zoom to or highlight.

Note that even if your data table from the SQL Query does have spatial information (i.e. you've selected a SQL Server Geometry or Geography column with the rest of your columns), converting this to a FeatureSet will not convert the spatial column into an Esri Geometry. Ultimately, if you have a DataTable from a SQL Query, you will not be able to zoom to it or highlight it on the map because a FeatureSet built from it will not have any spatial information.

I'd test your workflow out using the QueryTask instead, against an ArcGIS layer, since that'll give you a proper Esri FeatureSet that you can pass to the external command.

As for the ZoomToFeatures, this uses a Geocortex FeatureSet (with additional properties on it) that's pretty much useful only when actually in the client API, not from within Workflow. I'd just avoid that from workflow entirely.

Note that the commands in the API should all work when developing custom JS code in the viewer, but not all of them are available from workflow, depending on the parameter requirements of the command itself.

  • Thank you ubernatural for your response. Yes i wrongly wrote SQL Non-Query which is only for Insert, Update and Delete. I used SQL Query tool and the results were stored in DataTable. Converted DT to FeatureSet and then using that featureset variable as input parameter to RunExternalCommand tool. I supplied correct text for HighlightESRIFeatureSet (case sensitive) as i rigorously followed documentation. Do i need to first set active highlight layer , or set its color or border properties before this command is executed? Can you share your workflow images to guide me in proper direction? Thanks – rina Sep 25 '15 at 5:06
  • I've added some clarification to the answer above, basically reinforcing that if you create a FeatureSet from a DataTable, it won't have any spatial information at all (no geometry for any of the features). As a general rule, if a result set (from a query) is intended to have geometries then that should be queried right from ArcGIS Server rather than a direct SQL query. Note that you can provide your FeatureSet as a parameter to the SelectFeatures activity if you want to display the results in the viewer, but they won't show on the map. – ubernatural Sep 25 '15 at 16:34
  • Ok so i am catching up with what you are trying to explain. Ofcourse there wont be any geometries within featureset (as i use sql query ). Now there are other bunch of questions. What exactly then "DataTable to FeatureSet" tool would do ? "Select Feature" tool makes no sense as i want all results on map. "Get Map Service Info" also dont work for me as no map service url can be fetched for HTML5 viewer. "Query Task" or "Buffer Task" tool in workflow only acccept map service url published via ArcGIS server. And I use AGOL to publish feature layers. Any help? Thank you. – rina Sep 26 '15 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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