.Hello thejus kambi, all things is right
But the results of grid show the Layer A fields not table B. How we can show the fields of table B in the grid and when users click on the record zoom to it.Here's the sample:
define([
'dojo/on',
'dojo/topic'
], function (on, topic) {
return {
map: true,
mapClickMode: true,
layers: [
{
name: 'LayerA&TableB',
queryParameters:{
type:'table',
url: 'https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/...',
outFields: ['*']
},
linkField: 'sf_311_serviceoid',
idProperty: 'objectid'
,
attributeSearches:[{
name: 'Search for TableB fields',
searchFields: [
{
name: 'Inspector Name',
label: 'Inspector Name',
expression: ' ( 1 = 1 )',
placeholder: 'Enter the Inspector Name',
required: true,
minChars: 1
}
]
, title: 'Inspector',
topicID: 'InspectorQuery',
gridOptions: {
columns: [
{
field: 'sf_311_serviceoid',
label: 'Name',
width: 150
},
{
field: 'agree_with_incident',
label: 'agree_with_incident',
width: 150
}
],
sort: [
{
attribute: 'sf_311_serviceoid',
descending: 'ASC'
}
]
}
}]
,
linkedQuery: {
url: 'https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/...',
type: 'spatial',
linkField: 'objectid',
outFields: ['*'],
ids: []
}
}
]
};
});
The results: