Select to view content in your preferred language

Arcgis Pro query params

374
1
10-12-2023 11:34 PM
AdmirSerifi
New Contributor

Hello everyone

Arcgis Pro offers the possibility in the sql source to use query params and these params must have a default value. My question is: where should I define these parameters in the REST API request so that I can implement different filters in the sql query. I tried with "customParamaters" property as object, but it doesn't work.

Source definition:

2023-10-13 08_28_33-Edit Query Layer.png

 

Query params:

2023-10-13 08_29_16-Layer Properties_ Basestations.png

 

Javascript code:

2023-10-13 08_30_01-● basestation.ts - mds (Workspace) - Visual Studio Code.png

 

This questions is related to "Standardized Queries" option in Arcgis Pro.

THX

Tags (2)
1 Reply
TanuHoque
Esri Regular Contributor

@AdmirSerifi 

for export operation, please use `layerParameterValues` parameter. Pls see the help here: https://developers.arcgis.com/rest/services-reference/enterprise/export-map.htm

for query operations, use `parameterValues` parameter. Pls see the help here: https://developers.arcgis.com/rest/services-reference/enterprise/query-map-service-layer-.htm

when you are constructing a feature layer in your js api code, you are right you need to use `customParameters` but you need to formulate it correctly. In your case, it should be something like

customParameters: {
  parameterValues: { netGroupId: 1 }
}