WAB Display GP Service Results

06-13-2016 04:03 PM
New Contributor

I have seen a large number of posts about how to fix issues with Web AppBuilder not displaying results from GP Services, and a lot of people wrapping their python tool in Model Builder. Here is a loose guide that may help if you have this problem that don't involve model builder. Some of these steps may not be required, but doing these always works for me.

1. On your final output, define a variable to equal the ".getOutput(0)" of the last tool ran. You can do this for intermediate data too, but at minimum, the output needs that.

2. Use SetParameter(index, step 1 variable) to set the output result to show up.

3. Use FeatureLayer, RasterLayer, or TableView as outputs. Also inputs work with FeatureLayer nicely. FeatureSets seem to be more problematic than pre-10.1 versions.

4. When publishing an asynchronous service, make sure to check on "view results in map service"

5. Make sure to set all input variables to user input that require it.

6. The server changes your code. If you have access to the arcgisserver directory, go to arcgissystem/arcgisinput/your folder/your service/extracted/v101 and find your original python file. Delete ESRI's code as it can break things. I usually just overwrite with my original code.

7. You should be able to add code to WAB (v1.3+) and it should work.

8. If you still have problems, use a web debugger like fiddler and check the server logs to make sure something else isn't happening.

Post any other suggestions if you have them.

2 Replies
New Contributor III

Such a pain in the butt for raster data, but this looks promising

0 Kudos
New Contributor II

Consider using os.path.join() to create your path file variables. I've had trouble getting my gp service results to show when I don't do this. 


0 Kudos