Hoppa till huvudinnehållet

How to number the rows in the Results List and Results Table?

Kommentarer

2 kommentarer

  • Permanently deleted user
    I was able to do this.... only to a certain point.  I can add a new column to the featureset and have it show up in the data table results, IF I use SelectFeatures and leave the MapServiceID blank.  This way it picks up the changes to the featureset rather than going back to the map service to determine the fields to display.

     

    1.  Problem 1 - the new column comes in at the END of the table, not as the first field.  So, not visible without scrolling when table opens.

     

    2.  Problem 2 - I can use InvokeMethod with the INSERT option rather than the ADD option and then I can specify the index of the new field.  Unfortunately when the featureset is processed, there are two parts to the string, the first which is the FIELD/SCHEMA info.  The field is in the right place at index = 0.  The second part of the JSON string is the dictionary of features and attributes, and these are ordered with the new field at the end of the line.  Have not figured out a way to reorder the attributes.

     

    3.  Problem 3, and the showstopper - because I did not specify the MapServiceID in SelectFeatures, the values that come across in the featureset  no longer have the domain descriptions (for fields with domains) but instead show the coded values.  To fix this I would literally have to iterate through every feature and every field in my results and go retrieve the description and replace the coded value in my featureset.  This is WAY too much processing, and I will have to figure out a different way to do what I need to do.
    0
  • Permanently deleted user
    Hi Tami,

     

    It sounds like you got really far with your own solution, that's great!

     

    I can add two pieces of information that might help:

     

    1.  If you're adding new fields to a FeatureSet, you must also add to the Fields attribute of the FeatureSet object itself so that it's serialized and presented properly in the viewer.

     

    2.  Since Essentials does not know about this new field, it will not tell the viewer, so that's why it vanishes when you specify the service ID.  One possible workaround would be to specify the feature details formatting when you use the Select Features activity.  I'm not sure if that will handle your coded values as we expect though - that's a similar problem where the viewer does not know that it should be replacing values with codes.

     

    You could also add a field to your source data, that you then reassign at runtime when querying and selecting with your workflow (an integer field that's null by default).  Then, Essentials will know about the field and you can use the out-of-the-box formatting.

     

    Regards,

     

    -Malcolm

     

     
    0

Du måste logga in om du vill lämna en kommentar.