Select to view content in your preferred language

Geoprocessor not returning any results (Solved)

620
1
12-21-2010 11:05 PM
asdfasdf1
Emerging Contributor
Hey, I have a model which I'm trying to get to work. It selects polylines based on attributes, and adds it to a new Feature Layer on the map.

I'm using the REST interface, and it's running in Synchronous mode. However, when I click "Execute Task" on the bottom of the http://server/ArcGIS/rest/services/Map/GPServer/SelectByRoadtype page, it says that there are no records returned. I get the same result when I execute it in my Flex webapp.

It works in ArcGIS Desktop though, and I've followed the required steps to make it publishable on ArcGIS Server, and the publishing works, everything seems alright, which makes me wonder why I just don't get any results.

Extra info:

The model in Desktop is:
Input Layer + Expression (P) -> Select Layer By Attribute -> Layer -> Make Feature Layer -> Output Layer (P)

- My Expression parameter's input in Desktop is "ROADTYPE" LIKE 'X', will this work?

- I'm using the tool as a tool layer.

- I set the output for the tool layer to %scratchworkspace%\OutputLayer. Am I supposed to do this?

I'm actually not sure whether it is more common to use QueryTask and FeatureLayer for querying a layer like this. Would that be better?

Hope you guys can help. Thanks. 🙂
Tags (2)
0 Kudos
1 Reply
asdfasdf1
Emerging Contributor
It was a stupid mistake on my part. The setting "Maximum Number of Records Returned by Server" in ArcGIS Server Manager was set to 500, whereas much more than that was returned, and it ended up showing that no records were returned. I actually got records when I increased the maximum number of records returned.

Maybe in future versions an exception could be thrown, instead of show that no records were found? 😛
0 Kudos