Select to view content in your preferred language

Query widget - optional columns how to?

3128
11
Jump to solution
03-08-2016 04:11 PM
Ravichandran_M_Kaushika
Occasional Contributor

dear Readers,

After playing with the results widget, we found that query widget has a bunch of out of the box features.  It took me some time to figure out that ALL was the equivalent of AND for all of the columns.  In the Silverlight version of our app, (of course it is not out of the box - hand coded stuff) the end users had the ability to choose which filters they could operate on as shown below.

In the picture below, the all would skip the condition for that column through a stored procedure where parameter would  @EAPParam = '' and inside the stored procedure the AND condition would be

AND (EAP = @EAPParam or @EAPParam = '') which would ensure that all EAP records are selected.

WAB13QueryFilter-01.png

Now we are trying to implement the same app in WAB 1.3.  I was able to open up fiddler and see the GET /ArcGIS/rest/services.... /0/query?f=...... if I choose any then it becomes an OR condition and if I chose ALL

WAB13QueryFilter-02.png

then it is a set of AND conditions. Is there a way to 'intercept' the query and check for <NULL> or '' blank values to remove those from the query stack and send the appropriate values.  I understand it cannot be done out of the box and that I have to find a js function in the wab black box.

any links pointers would be appreciated.

regards

ravi.

Tags (2)
0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus

Ravi,

  Does the https://gistest1.ftw.nrcs.usda.gov/arcgis/rest/services/hydrography/DamsJS/MapServer/0 url work for you on your end? I was hoping it was a public url so that I could test on my end.

The only thing that stands out in your json file was that the "operator": "" should be "operator": "AND". You should do a global replace and fix this.

Ravichandran_M_Kaushika
Occasional Contributor

Robert,

fantastic. After adding the AND as suggested by you, it worked. dynamically CHECKING for blank value is fantastic.

I am trying to download the .csv file for the separate datagrid generated from the query tool.  it is giving some download errors .partial file is present.

i will go through the contents of your queries to see how to fix my current issues.

once again kudos to you for creating this tool.

regards

ravi.

0 Kudos