Dynamic Workspaces with SQL Server problem

07-03-2019 01:03 AM
New Contributor II

I'm trying to follow this tutorial: https://www.esri.com/arcgis-blog/products/mapping/mapping/smart-mapping-with-dynamic-workspaces/ to join dynamically a table from an SDE to a layer on map. 

I've registered the workspace, giving to the user registered in the sde connection full privileges for the database, and enabled the dynamic layers on the MapService, but when i try to execute the JoinDataSource the layer disappear from the map. 

I also tried to make the query directly from rest:


Using the following parameter for dynamic layers: 


but the result is an empty image. 

I tried differend combinations for the right dataSourceName (ex: DYNAMIC_TEST, SDE_TEST.sde.DYNAMIC_TEST) as well for the rightTableKey, but the result is always an empty image. 

The javascript code is the following:

var joinDataSource = new JoinDataSource({
joinType: "left-outer-join",
leftTableSource: new LayerMapSource({
type: "mapLayer",
mapLayerId: 13
leftTableKey: "CPROV_18",
rightTableKey: "CPROV",
rightTableSource: new LayerDataSource({
dataSource: new TableDataSource({
type: "table",
workspaceId: "TEST",
dataSourceName: "DYNAMIC_TEST"

Attached there is the result of the export

Is there someone who knows what the problem can be? 

0 Kudos
0 Replies