Mapping a GPFeatureRecordSetLayer to a Listbox in a Workflow Form
Hi All,
I am trying put the attribute result of a Geoprocessor activitity (from a GPFeatureRecordSetLayer) into a Workflow Form. But I am lost in the steps I need to undertake to do this. I have played around with the "Collect external event Args" and the "List to data item List" activities. but I really don't know how to fill in all the fields right.
Below is shown (partially) the output parameter from the GP service. In details I want to map the Fields "Name", "SourceID" & "Total_minutes" to the Workflow form.
Can anyone help me out?
- Sune
Parameter: Closest_Resources
Data Type: GPFeatureRecordSetLayer
Display Name: Closest Resources
Direction: esriGPParameterDirectionOutput
Default Value:
Geometry Type: esriGeometryPoint
Spatial Reference: 25832
Fields:
ObjectID (Type: esriFieldTypeOID, Alias: ObjectID)
Shape (Type: esriFieldTypeGeometry, Alias: Shape)
Name (Type: esriFieldTypeString, Alias: Name)
SourceID (Type: esriFieldTypeInteger, Alias: SourceID)
FacilityRank)
...
Total_Minutes (Type: esriFieldTypeDouble, Alias: Total_Minutes)
-
Hi Sune,
I can see what you are attempting to accomplish.
Did Ryan Cooney’s post on our User Forum help you with this? I think his suggestion is a good start…
http://support.geocortex.com/Forums/Thread.aspx?thread=46114&mid=2&pageid=0&ItemID=20&pagenumber=1#post133308You will need to:
-
Get the “FeatureSet” object from the GPFeatureRecordSetLayer
-
Consult the Silverlight API reference at http://help.arcgis.com/en/webapi/silverlight/apiref/. You are looking for:
ESRI.ArcGIS.Client.Tasks >> GPFeatureRecordSetLayer >> Members
-
Consult the Silverlight API reference at http://help.arcgis.com/en/webapi/silverlight/apiref/. You are looking for:
-
Use the ForEach<T> activity to loop through each item in the FeatureSet.Features collection.
- FeatureSet.Features is an IList<Graphic> collection, so each item will be of type ESRI.ArGIS.Client.Graphic
-
For each graphic, you can get the values of the Name, SourceID, and Total_minutes attributes by accessing the “Attributes” collection. In VB syntax, getting the value of an individual attribute will be something like:
myGraphic.Attributes.Item(“Total_minutes”) - Put these values into a new Geocortex.Forms.Client.DataItem object. A list of these DataItem objects can be used to populate a drop-down in a form.
I hope this helps!
0 -
Get the “FeatureSet” object from the GPFeatureRecordSetLayer
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar