We have a script that takes selected features from up to three different layers, runs calculations on them, and returns a link to a text file viewable in a browser. In ArcDesktop, the user doesn't need to have selections from all three layers to return a result.
We have served the script as a geoprocessing tool and can semi-use it in a web app. The web app uses the "Select" widget to select certain features from the three layers, and then the user can click "Use Selected Features" in the "Geoprocessing" widget to import the selected features. To use the geoprocessing widget, there are three drop-down windows where the user selects the correct layer as input. Then, if there are selected features, the user can click the "Use Selected Features" option. Once all of the inputs are in, the "Run" button is pushed and the report is generated. However, an error is thrown if all three layers don't have (a) selected feature(s). Any idea what I can do to make inputs optional?
Got it working. Here's what did the trick:
Changed the script (I didn't do this, so I don't know how/where this was done) so that the layers that were visible to the Geoprocessing widget as a GPFeatureRecordSetLayer were Required: false and not Required: true. We didn't want to change the script, due to the time it would take and uncertainty if it would work, but there seemed like there was no other option.