Zum Hauptinhalt gehen

Export To CSV Command In Workflow

Kommentare

2 Kommentare

  • Ryan Cooney

    The QueryTask will give you a ESRI.ArcGIS.Client.Tasks.FeatureSet, but the ExportFeaturesToCsv commands accepts a Geocortex.Essentials.Client.Tasks.FeatureSet. Since the types don't match the command won't execute. The Geocortex FeatureSet doesn't serialize so you won't just be able to convert it in your workflow and pass it to the command. You will need to pass the Esri FeatureSet to a command or activity handler on the client that will then convert it and launch the ExportFeaturesToCsv command for you.

    You can use Geocortex.Essentials.Client.Tasks.FeatureSet.CreateFeatureSet(esriFeatureSet, null) in your Silverlight module to do the conversion.

    There is a browser security restriction that you will likely encounter if you try this. The ExportFeaturesToCsv command opens the browser's built-in Save File Dialog. The act of opening this particular dialog must be initiated directly by the user. When you run a workflow the instruction to open the dialog has been initiated by the server. The action will be blocked and you will see an error. A common approach to get around this would be to have your activity handler show a control with a button that is linked directly to the command (similar to the printing and export map dialogs). When the user clicks the button they are directly initiating the command and it will work.

    --Ryan

    0
  • Permanently deleted user

    Thanks I noticed the issue with the difference between the Esri and GC feature sets but this will save me some time now that I now about the activity handler.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.