Results are blank
I'm sure this is something simple but I've looked at this workflow long enough so I wanted to see if y'all could point me in the right direction. My silverlight application is consuming a mapservice and I've set a particular layer to have a FeatureLabel so when I run a global search on a string in my Silverlight site, it properly returns a list of results AND displays those fields correctly in the results panel. But in my workflow I'm running a QueryTask that has Out Fields set to "*" and I perform a SelectFeatures. The results that are returned has the correct amount of records but every record is blank unless I switch it to Table View. What could be going wrong here? See my screenshots below.
/customer/servlet/servlet.FileDownload?file=00P6000000eluCjEAI
-
Unbelievable. Well apparaently I have to supply the LayerID and the MapserviceID in the parameters of selectfeatures for some reason. Now all results are displaying the display field from the mxd for this layer. yay.
/customer/servlet/servlet.FileDownload?file=00P6000000e88JmEAI /customer/servlet/servlet.FileDownload?file=00P6000000e88T6EAI
0 -
Josh,
If you want to make your workflow portable, I'd recommend storing your layer name and map services ID in variables and using the GetMapServiceInfo activity to get the layer id based on the layer name. By doing it this way, you don't have to worry about reorganizing layers in your map service, which will change the layer id of the layer you want to query. Also, if you want to reuse the workflow on a different layer, or in a different site, all you have to do is change the default values for your layer name and map service id variables.
-John Nerge
Example:
<Activity mc:Ignorable="sap" x:Class="{x:Null}" sap:VirtualizedContainerService.HintSize="392,750" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:eac="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client" xmlns:eacg="clr-namespace:ESRI.ArcGIS.Client.Geometry;assembly=ESRI.ArcGIS.Client" xmlns:eact="clr-namespace:ESRI.ArcGIS.Client.Tasks;assembly=ESRI.ArcGIS.Client" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core" xmlns:gfc="clr-namespace:Geocortex.Forms.Client;assembly=Geocortex.EssentialsWpfApi" xmlns:gfci="clr-namespace:Geocortex.Forms.Client.Items;assembly=Geocortex.EssentialsWpfApi" xmlns:gr="clr-namespace:Geocortex.Reporting;assembly=Geocortex.Reporting" xmlns:gwa="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow" xmlns:gwa1="clr-namespace:Geocortex.Workflow.Activities;assembly=Geocortex.Workflow.Activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=System.Core" xmlns:s1="clr-namespace:System;assembly=System" xmlns:s2="clr-namespace:System;assembly=mscorlib" xmlns:s3="clr-namespace:System;assembly=System.ServiceModel" xmlns:sa="clr-namespace:System.Activities;assembly=System.Activities" xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Sequence sap:VirtualizedContainerService.HintSize="352,710" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="x:String" Default="0" Name="mapServiceId" />
<Variable x:TypeArguments="x:String" Default="my layer name" Name="layerName" />
<Variable x:TypeArguments="x:String" Name="mapServiceUrlLayername" />
<Variable x:TypeArguments="x:String" Name="layerIdLayername" />
<Variable x:TypeArguments="esri:FeatureSet" Name="resultFeatureSet" />
</Sequence.Variables>
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
<gwa1:GetMapServiceInfo sap:VirtualizedContainerService.HintSize="330,128" LayerId="[layerIdLayername]" LayerName="[layerName]" MapServiceId="[mapServiceId]" MapServiceUrl="[mapServiceUrlLayername]" />
<gwa1:QueryTask sap:VirtualizedContainerService.HintSize="330,227" OutFields="*" QueryServiceUrl="[mapServiceId & "/" & layerIdLayername]" Results="[resultFeatureSet]" ReturnGeometry="True" SpatialRelationship="esriSpatialRelIntersects" />
<gwa1:SelectFeatures FeatureSet="[resultFeatureSet]" sap:VirtualizedContainerService.HintSize="330,151" LayerId="[layerIdLayername]" MapServiceId="[mapServiceId]" />
</Sequence>
</Activity>0 -
Thanks John. Unfortunately for this workflow, I have to use Geocortex 3.6. I believe that activity you mentioned is available in 3.13. But I will still try to store the mapserviceID's and Layernames in variables to see if that helps.
Best regards,
-Josh
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare