Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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'] 

}); '
share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
thanks for your reply. I will check it out and let you know –  Sunil Nov 8 '12 at 6:07
    
thanks for your reply..I tried your way and its resolved.. thanks : ) –  Sunil Nov 10 '12 at 6:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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