Zum Hauptinhalt gehen

Out Fields in the Query Task

Kommentare

15 Kommentare

  • Permanently deleted user

    Hi Larisa

    make sure that the case is correct ie Address or ADDRESS.

    Probably best to look at the REST endpoint for that layer in the service to confirm what the fields are. You can then test the field choice that you are making there as well.

    Regards

    Ralph

    0
  • Permanently deleted user

    Hi Ralph,

    Thank you!  I checked the field names, all is good and I checked them in the REST endpoint. Everything works when I test it. 

    One other thing, if I take out the NAME and just ask it to retrieve the ADDRESS and BOARD, it brings back the Layer name from the mxd and then the ADDRESS and BOARD. So it looks soemthing like this:

    eg: Schools with Wards,123 Any St, W.E.C.D.S.B.

    But, when i string them all together it is like the "NAME" overides everything else adn it will only display that.

    very puzzling.

    0
  • Permanently deleted user

    Hi Larisa

    can I get to the REST endpoint to have a look?

    Ralph

    0
  • Permanently deleted user

    Geocortex:

    http://www.mappmycity.ca/Geocortex/Essentials/REST/sites/My_City/map

    ArcGIS :

    http://localhost:6080/arcgis/rest/services/MappMyCity/CityofWindsorOperationalMap/MapServer

    0
  • Permanently deleted user

    Which layer are you working with?

    Ralph

    0
  • Permanently deleted user

    Schools with Postal Codes (ID # 57)

    and Municipal Election Wards was the other layer part of that work flow (ID #59)

    0
  • Permanently deleted user

    I wish I could answer that. I am not sure where to look or what it is. This is all very confusing and slowly bit by bit I am figuring it out.

    0
  • Permanently deleted user

    Hi Larisa

    after the query, to confirm what you are getting back you could use an Alert Activity where the text of the Alert  is set to:

    school_FS.Features(0).Attributes("NAME").ToString

    Regards

    Ralph

    0
  • Permanently deleted user

    I still cannot figure out why my query on selecting a school per Ward  will only pull back the NAME field and not the ADDRESS, BOARD or any other field that I specify. 

    this is what the FeatureSet shows:

    {"geometryType":"esriGeometryPoint","spatialReference":{"wkid":26917},"hasZ":false,"hasM":false,"fields":[{"name":"NAME","type":"esriFieldTypeString","alias":"NAME","domain":null,"editable":false,"nullable":true,"length":254},{"name":"ADDRESS","type":"esriFieldTypeString","alias":"ADDRESS","domain":null,"editable":false,"nullable":true,"length":250},{"name":"BOARD","type":"esriFieldTypeString","alias":"BOARD","domain":null,"editable":false,"nullable":true,"length":50}],"features":[{"geometry":{"x":330936.81740000006,"y":4684784.3972999994,"spatialReference":{"wkid":26917}},"attributes":{"NAME":"Dr. H.D. Taylor Public School","ADDRESS":"1275 Campbell Ave","BOARD":"G.E.C.D.S.B."}}]}

    It is very clearly pulling back the correct information. It just will not display in the app. And then to further complicate things...when I remove the NAME from the query it will pull back the Layer name from the mxd and then any other field I specify.

    0
  • Permanently deleted user

    Hi Larisa,

    I briefly took a look at this thread a little while ago but it looked like Ralph had it covered, but I'll pop in now and see if I can help. Do you have a Url where I can look at the workflow in action?

    I have a suspect that it is due to the way that the layer in configured in manager. If you are performing a SelectFeatures activity after your query, you need to specify the correct layer. This will inherit the configuration (which fields to display etc.) when the results appear in the results pane.

    Warren

    0
  • Permanently deleted user

    Hi Larisa,

    I think I figured it out, having the workflow etc. really helps put everything in context. If I'm correct, the reason it isn't showing anything in the results window, despite having returned all the necessary fields from the query, is because the fields have not been formatted into the descriptions that display in the viewer.  Without being able to see the configuration you done in Manager I'll just illustrate using my configuration.

    I think the layer you are currently using to search for schools (Schools with Postal Codes) has not been configured using the manager (there has not been a Feature Description, Long Description etc. created for this layer). Therefore, when this layer is selected the viewer defaults to displaying just one field, in your case it looks like it reverted to the School Name which is helpful but has only added to the confusion when trying to figure out why the other fields and attributes have not appeared.

    To correct this I would review the configuration you have for the Schools with Postal Code layer in manager and create the appropriate string you would like to see using the NAME, ADDRESS, and BOARD fields. Alternatively, you could create the descriptions in the workflow itself using the available arguments (below). I have not done this before so I cannot offer any tips but I imagine you'd want to assign the attribute returned from the QueryTask to a string variable and concatenate that into a description string of sorts ex. "This school, "+NAME+" is located at "+ADDRESS .

    Hopefully this helps,

    Warren

    /customer/servlet/servlet.FileDownload?file=00P6000000elzJnEAI

    0
  • Permanently deleted user

    Also,

    I would suggest setting the Clear Collection First argument to 'True' so if the user runs the workflow more than once only one school is ever selected rather than adding a new result to the result window.

    Warren

    0
  • Permanently deleted user

    Warren!

    Thank you so much! That was it!!! It never occured to me that even though that layer in my manager was not visible that the feature and feature long description were not defined. Thank you so much...

    and I have also changed Clear Collection First argument to 'True'. That makes far more sense.

    I appreciate your help. this was a huge learning curve for me.

    Larisa

    0
  • Permanently deleted user

    Good! Glad I could help,

    Don't worry we've all encountered the learning curve.

    Warren

    0

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