Select to view content in your preferred language

How to use parametrized query layers

397
4
06-14-2023 03:57 PM
jesdial
New Contributor II

Dear all

I have created a parametrized query layer and published it as a mapservice. Is it possible to modify the values of the query layer parameters in the "query" operation? I have tried the "Parameters value" in the Query operation...but does not work (the values returned by the service coincide with those set as default in the "Query Parameters" option in ArcGIS Pro).

Best regards

Jesús de Diego 

0 Kudos
4 Replies
jesdial
New Contributor II

OK; forget this... I was not introducing the correct format in the Parameters Value option in the service rest interface.

 

Regards

 

Jesús

Jesse
by
New Contributor III

Hey there,

Could you potentially post your working example? I find myself in the same predicament but could use an example to help guide my thinking.

Thanks!

0 Kudos
jesdial
New Contributor II

Hi Jesse

Sorry for the late responst, first of all. If you already created and published the parametrized query layer, you can access to the layer REST end point in the service and open the "Query" operation.

 

The Where clause should be : 1 = 1 (or any other where clause you want to use, but do not leave this value blank).

Then you have to fill the “Parameter Values” parameter. The appropriate way of filling it would be :


{ “Param Name” : "String Param Value" , “Param Name” : Param Value…}

 

Hope this helps

Jesús de Diego

 

0 Kudos
Jesse
by
New Contributor III

MUCH appreciated, thank you for taking the time to respond!!

0 Kudos