Zum Hauptinhalt gehen

Add Attributes

Kommentare

10 Kommentare

  • Permanently deleted user

    Update on this.

    I have the Invoke Method setup as described. There are two Parameters, In String "NAME" and In Object "New Name".

    If i then loop through the graphics within my featureset item.Attributes("NAME") shows me "New Name".

    Yet when I use the SelectFeatures tool the new attribute isn't showing.

    Any ideas?

    Thanks

    0
  • Permanently deleted user

    Hi

    Figured this out for myseld in the end. I had to add a new Field to the featureset to get the new attribute to show.

    0
  • Permanently deleted user

    how did you add a new field to a featureset.  i would like to know how to do that.  can you provide a sample syntax or a workflow snippet?

     

    0
  • Permanently deleted user

    Create a new variable of type ESRI.ArcGIS.Client.Field and Default value e.g. New ESRI.ArcGIS.Client.Field("FIELD_NAME", ESRI.ArcGIS.Client.Field.FieldType.String, "FIELD_NAME", Nothing, False, True, 100). Then use the InvokeMethod tool. TargetType null, TargetObject being your FeatureSet and MethodName Add. In the parameters Direction In, Type Field, Value being the varible you created above.

     

    0
  • Permanently deleted user

    Trying to add an attribute to a featureset with little success.  Anyone kind enough to share an example?

     

    0
  • Permanently deleted user
    Also, I'm having trouble getting the "methodname" in the invoke methode activity to understand "Add".  It's saying that "Add" is not a public method on Featureset.  
    0
  • Permanently deleted user
    Have tried this and the TargetObject needs to be _featuresetvariable.Fields at which point the Add is recognised. Thanks Matthew for the details, saved me a lot of hassle.
    0
  • Permanently deleted user
    I can see the new temp field I have added (using above instructions - thank you!) ONLY if I iterate through the field collection in my workflow.  When the selected recs come up in the viewer the new field is not showing up. 

     

    However, I need the new field and the attributes I set to be visible when I do the SelectFeatures tool, as I need to be able to label features based on this 'new' temporary field.  Any thoughts on why this isn't showing up?
    0
  • Permanently deleted user
    Figured it out... in the Select Features tool, I needed to leave the Map Service ID blank so it would use the featureset to select and use those fields, not the configured fields in the map service.  Also helpful to know is that once I did this, things that I had set as invisible like OBJECTID and GLOBALID show up again in the table.  So, you will have to remove those from the featureset if you don't want to see them.
    0
  • Permanently deleted user
    Ok, one more question, as I am still scratching my head...

     

    I have my featureset showing up in the results table, with my new field as the last field in the table.  I need my new field to be the FIRST column in the table, so that users can see the values without having to scroll to the end.  

     

    To add this field, I am using the InvokeMethod to add a field to the featureset.  Works great, but is there a way to specify an index for adding the new field to the featureset?  I'd like to add it at index 0 so it would be the first column and not the last.

     

    Any ideas?
    0

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