1

Currently I am facing following problem

I have joined the SQL Server data base to my shape files (In ArcGIS Desktop using “join” option)and published on ArcGIS Server and working on REST service in JavaScript API. After joining the tables to the map… all columns are changed. Let us say info.id, attr_name.ratio etc.

Therefore, when I am using info window option I cannot use “info.id” it is considering only “info” it gives an error if I used “info.id”.

Any help will be great...

Software’s: ArcGIS DT 10.1 and Server 10.1

Code Sample:

'var featureLayer = new esri.layers.FeatureLayer("http://<myserver>:6080/arcgis/rest/services/type/MapServer/1", 

{
     // mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
      mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
      infoTemplate:popupTemplate,
      outFields: ['info','attr_name'] 

}); '

1 Answer 1

4

I think you need to reference the fully qualified field names. It also looks like you are only including the table name in the outFields property instead of the field names, if I'm following your code sample correctly.

If you change the outFields property to something like:

outFields: ['info.id', 'attr_name.ratio']

Or you are using SDE you will need to include the database name, schema and table name in the field name as well:

outFields: ['DatabaseName.dbo.info.id', 'DatabaseName.dbo.attr_name.ratio']

You can also check your REST services directory and it will show you the format of the field name for you map service.

2
  • thanks for your reply. I will check it out and let you know
    – Sunil
    Nov 8, 2012 at 6:07
  • thanks for your reply..I tried your way and its resolved.. thanks : )
    – Sunil
    Nov 10, 2012 at 6:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.