AnsweredAssumed Answered

QueryDataSource - anyone use this?

Question asked by amarsden on Jul 10, 2013
Latest reply on Jul 10, 2013 by amarsden
Hi

I have a need to query a single table in my SDE in my API pages.  I stumbled across the QueryDataSource class

https://developers.arcgis.com/en/javascript/jsapi/querydatasource-amd.html

T
here seems no examples of this in use and very scant documentation.  The main thing I realized straight away is I had no idea what the "workspaceId" is beyond the description" The workspace id for the registered file geodatabase, SDE or Shapefile workspace."

Am I right in assuming this is one of the data connections we started to have to define in ArcGIS server 10.1?  I'm not sure it can be as there isn't a note to say it requires 10.1

Cheers

ACM

edit - I have a feeling I'm going to answer this one myself by the end of a the day, but just found this

ArcGIS Server 10.1 also provides the ability to work with data in a registered workspace but not published via a map service. This gives administrators and developers the flexibility to add data to apps that isn't visible from the REST services directory. The caveat is that developers need to know the workspace name and data layer/table name to be able to add it to a web application. To see this in action, click the "Add Lakes" button. The lakes layer can then be reordered within the map service.


My bold/underlining - so is it the NAME I need?

OK failed there, moved onto TableDataSource - same issue with lack of docs and using the Data connection name I get

Unable to find 'workspaceId'in 'dataSource' for dynamic dataLayer with 'id': -1.",

No-where can I find what the ID is.

Outcomes