Multiple Parameter Query Using Query Task in ArcGIS Javascript API

1072
2
Jump to solution
09-01-2014 11:46 AM
DavidMuthami1
Occasional Contributor

I want to pass parameters to a web service as an array. The code snippet will thereafter be modified such that the parameters are supplied by SharePoint

Please use link below to follow my sample work in github

dmuthami/multipleParameterQuery · GitHub

My Question.?

Is my implementation the best way to go about it or their are other ways that are efficient in terms of speed.?

Kindly advise.

0 Kudos
1 Solution

Accepted Solutions
RiyasDeen
Occasional Contributor III

Hi David,

I would recommend having one in clause over multiple or clauses. Replace your build where clause section with below line.

              if (erven.length > 0) {

                var myWhere = local_Authority_Prefix + "_erf_no in ('" + erven.join("','") + "')";

              }

View solution in original post

0 Kudos
2 Replies
RiyasDeen
Occasional Contributor III

Hi David,

I would recommend having one in clause over multiple or clauses. Replace your build where clause section with below line.

              if (erven.length > 0) {

                var myWhere = local_Authority_Prefix + "_erf_no in ('" + erven.join("','") + "')";

              }

0 Kudos
DavidMuthami1
Occasional Contributor

Hi Deen,

Your response is valuable and amazingly correct. I have gone ahead and included proposed changes and the revised code can be accessed from below link in github

dmuthami/MultipleParameterQuery · GitHub

0 Kudos