Hi
I'm trying to set up a date query using the Query widget in a Web AppBuilder app but the query doesn't return any results...can't figure out why. I get a message saying 'query failed!' and 'number of features found: 0', when there should definitely be some results returned.
So far I've checked/ tried a few things:
Any suggestions for other things I can try?
Thanks for your help!
Solved! Go to Solution.
Cormac,
You are running into an issue with the query widgets SQL statement being formed using 'timestamp' when it should not be. I have seen others report this issue and it seem to normally happen when people are using a featureLayer from AGOL for their query. This is some thing you need to call esri tech support about to make sure there is already a bug logged for this.
This is the query that the query widget sends:
http://services.arcgis.com/tnTLtmrGqbVBqigz/arcgis/rest/services/AGOL_Date_Test_WGS84.gdb/FeatureSer...
this is what it should be sending:
Hey Cormac,
You might want to move this question into Web AppBuilder for ArcGIS so it is seen by the widget group.
Cormac,
I have setup the query widget using time enabled layers and not had any issue.
Lisa, Robert - thanks for your replies.
I can't make the service public unfortunately because the data is sensitive, but I'm going to try with a different 'test' layer tomorrow and see if I get the same problems.
The only other information I can give is that the service is hosted on AGOL using Feature Layers that have been uploaded to the AGOL server - so there is nothing held outside of AGOL.
Any other suggestions on what I can try would be appreciated, I'll try posting on the Web AppBuilder forum tomorrow if I'm not having any more luck.
Thanks again
I've now tried with a test file and am getting the same error message...must be something in the way I've set up the query?
I've made the test app public - link below - if you are able to have a quick look and see if you can spot what the problem is I'd really appreciate it.
Thanks again
Cormac,
You are running into an issue with the query widgets SQL statement being formed using 'timestamp' when it should not be. I have seen others report this issue and it seem to normally happen when people are using a featureLayer from AGOL for their query. This is some thing you need to call esri tech support about to make sure there is already a bug logged for this.
This is the query that the query widget sends:
http://services.arcgis.com/tnTLtmrGqbVBqigz/arcgis/rest/services/AGOL_Date_Test_WGS84.gdb/FeatureSer...
this is what it should be sending:
Here is another thread showing the same issue:
Robert - thanks for your help with this, I've reported the issue as a bug so hopefully someone at ESRI will have a look at it. In the meantime I'll set up a dummy date field using integers so users can still search by 'date'.
thanks again
Can you provide the bug number? I would like to follow the bug and push up its priority with esri?
Thank you,
Subu
I don't know if you've found this yet Subu, but the Bug number is: BUG-000084034 BUG-000084034 - Using the Query widget on date fields in Web AppBu..
The page says that the status is "Closed:Fixed", but I am still having this problem with querying on a date field. Are you still experiencing this problem?