Select to view content in your preferred language

Using geoprocessing services with precondition boolean in ArcGIS Online

594
0
10-27-2016 01:28 AM
JamesWellington
New Contributor

I have a model where I have a basic if-else need. The second half of my model I don't want to run if a condition is not met. This is based on whether a piece of data has any records or not. I have simply added a get count and then calculate value based on the get count result. There are then 2 tools that have a precondition on the result of the calculate value. 

The tool runs fine if the condition is or isn't met. I want to use the tool in the web app builder so have run the tool with the condition met, published as a geoprocessing service and put into a geoprocessing app in the web app builder. The tool runs fine if the condition is met but if it isn't, the tool fails (see below image).

Is there a way I can get the tool to finish gracefully if the condition is not met? Can you use preconditions like these in a geoprocessing service? 

The user will not know if the condition will be met when running the process so both scenarios could be correct and I want the tool to work gracefully either way. 

##

0 Kudos
0 Replies