how to work with the getselected activity result
the getselected activity result is a geocortex.essentials.clent.featureset. how do i convert that to something useful, i need to get the fields and attributes from this object. there are no examples in the help or in a workflow. does anyone have one?
-
THANK YOU!!!!
thank you for the code and sample!!!! However, I do need some clarification of the "FeaturesetID" in the GetSelectedFeatures Activity. In the sample you have "11/0" as the FeaturesetID. what does that refer to? or where did it come from. does it refer to indexes of mapservices, layer indexes etc.? or is it just a made up entry?
I was going to use the get selected function as an right click on a selected record in the results table, then get the geometry and attributes and perform gis operations from there. so knowing if that's just an arbitrary phrase or reference to existing items is important.
Jeff0 -
Hi Jeff,
Sorry I forgot to include the definition of that variable. The FeatureSetID is actually a combination of the MapServiceID and the LayerID combined together in a string MapServiceID/LayerID. In the workflow that I actually used that sample I gather all of this information from a GetMapServiceInfo activity and created a string variable: MapIDLayerID = MapServiceID+"/"+LayerID.
-Warren
0 -
Could you send you complete workflow I have it fetching all the selected records but I am looking for the record with the highlighted star in the table view J 0 -
Here a sample workflow I got from Latitude, with the Get Selected Features activity:
<Activity mc:Ignorable="sap sap2010 sads" x:Class="{x:Null}" mva:VisualBasic.Settings="{x:Null}" sap2010:WorkflowViewState.IdRef="ActivityBuilder_1"
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:gce="clr-namespace:Geocortex.Core.Extensions;assembly=Geocortex.Core"
xmlns:gcx="http://apis.geocortex.com/2009"
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:sa="clr-namespace:System.Activities;assembly=System.Activities"
xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
xmlns:sl="clr-namespace:System.Linq;assembly=System.Core"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments="x:String">
<x:String>System.Activities</x:String>
<x:String>System.Activities.XamlIntegration</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>System.Activities.Expressions</x:String>
<x:String>System.Activities.Validation</x:String>
<x:String>ESRI.ArcGIS.Client</x:String>
<x:String>ESRI.ArcGIS.Client.Geometry</x:String>
<x:String>ESRI.ArcGIS.Client.Tasks</x:String>
<x:String>Geocortex.Core.Extensions</x:String>
<x:String>Geocortex.Workflow.Activities</x:String>
<x:String>Geocortex.Forms.Client</x:String>
<x:String>Geocortex.Forms.Client.Items</x:String>
<x:String>Geocortex.Reporting</x:String>
<x:String>System</x:String>
<x:String>Microsoft.VisualBasic.Activities</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Windows.Markup</x:String>
<x:String>Geocortex.Essentials.Client</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments="AssemblyReference">
<AssemblyReference>System.Activities</AssemblyReference>
<AssemblyReference>ESRI.ArcGIS.Client</AssemblyReference>
<AssemblyReference>Geocortex.Core</AssemblyReference>
<AssemblyReference>Geocortex.Workflow</AssemblyReference>
<AssemblyReference>Geocortex.EssentialsWpfApi</AssemblyReference>
<AssemblyReference>Geocortex.Reporting</AssemblyReference>
<AssemblyReference>System.Core</AssemblyReference>
<AssemblyReference>System</AssemblyReference>
<AssemblyReference>mscorlib</AssemblyReference>
<AssemblyReference>PresentationFramework</AssemblyReference>
<AssemblyReference>WindowsBase</AssemblyReference>
<AssemblyReference>PresentationCore</AssemblyReference>
<AssemblyReference>System.Xaml</AssemblyReference>
</sco:Collection>
</TextExpression.ReferencesForImplementation>
<Sequence sap2010:WorkflowViewState.IdRef="Sequence_1" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
<Sequence.Variables>
<Variable x:TypeArguments="scg:List(gcx:EssentialsFeatureSet)" Name="selectedFeatures" />
</Sequence.Variables>
<gwa1:GetSelectedFeatures sap2010:WorkflowViewState.IdRef="GetSelectedFeatures_1" SelectedFeatures="[selectedFeatures]" />
<gwa1:Alert sap2010:WorkflowViewState.IdRef="Alert_1" Text="[selectedFeatures.First.esriFeatureset.Features.Count.ToString]" Title="The following number of features were returned: " />
<sads:DebugSymbol.Symbol>d21DOlxQcm9ncmFtIEZpbGVzICh4ODYpXExhdGl0dWRlIEdlb2dyYXBoaWNzXEdlb2NvcnRleCBFc3NlbnRpYWxzXERlZmF1bHRcUkVTVCBFbGVtZW50c1xTaXRlc1xHZXRTZWxlY3RlZC54YW1sBkIDSQ4CAQFGBUZ/AgEFRwVHvQECAQJGaEZ8AgEGR0BHgQECAQRHiAFHugECAQM=</sads:DebugSymbol.Symbol>
</Sequence>
<sap2010:WorkflowViewState.ViewStateManager>
<sap2010:ViewStateManager>
<sap2010:ViewStateData Id="GetSelectedFeatures_1" sap:VirtualizedContainerService.HintSize="349,111" />
<sap2010:ViewStateData Id="Alert_1" sap:VirtualizedContainerService.HintSize="349,86" />
<sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="371,361">
<sap:WorkflowViewStateService.ViewState>
<scg:Dictionary x:TypeArguments="x:String, x:Object">
<x:Boolean x:Key="IsExpanded">True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id="ActivityBuilder_1" sap:VirtualizedContainerService.HintSize="411,441" />
</sap2010:ViewStateManager>
</sap2010:WorkflowViewState.ViewStateManager>
</Activity>0 -
THANK YOU for your responses, i have "get selected features" working now and i am on my way to having to ask more questions. Your responses are what make this forum work. thank you for your time and effort!
Jeff
0 -
Hello Jeff, Nico, and Warren,
I am learning Workflow with some sucess, it is a powerful and confusing develper tool. However, I have hit a road block at a very basic task. Getting the user selected features. That is, I am not trying to ask the user to select features such as the "Display Capture Geometry" activity nor am I trying to "Select Features" activity. I wish to capture the features that the user has choosen and are present in the "Selected" tab. I took the Workflows course; unfortunately it does not have an example of this action. While searching the forums for help I came upon this entry and thought I found what I have been looking for... However, when I check out the available Activities of Workflow Designer 4.0 and the Geocortex Workflow Designer 4.0 guide "GetSelectedFeatures" does not exist as an activity!
Is this a custom activity? Are you using another version of Workflow that does contain this activity? If this is not available in 4.x do you know of an alternate way of obtaining the already selected features?
I really appreicate any help provided, I am combing through examples, guides, and forums but have not found anything dealing with this very basic action.
Thanks,
Wiley
Contra Costa County, CA
Public Works Dept.
0 -
Hi,
Nevermind. My build of the workflow designer was bad. Downloaded a fresh one and the activity was there.
Thanks,
Wiley
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
7 Kommentare