I'm trying out a script that does two related functions.
I have it set up so that either function can run by itself, or you can run both simultaneously.
My parameters are as follows
Is there a way to make it so that either B or D, or both of them together, must be answered?
Basically I'm trying to avoid the users running the tool in such a way that neither function runs.
Similarly, is it possible to make Parameters have conditional visibility? Like, C only shows up if B is answered or toggled.
Thanks!
Solved! Go to Solution.
Hi Alfred,
What you are after is Script Tool Paramter Behaviour. You can set the Parameter[i].enabled = True/False to enable disable a parameter. You can apply a condition on Parameter B's values to dynamically enable/disable Parameters C/D.
The logic would be something like the below:
Parameter B should be a MultiValue list with your selectable (filter) options: Function A, Function B
Parameter C has a dependency on Parameter B and is enabled when Parameter B has Function A in its list of values.
Similarly, Parameter D has a dependency on Parameter B and is enabled when Parameter B has Function B in its list of values.
If both Function A and Function B are selected in Parameter B, both Parameter C and D will be selectable.
Hope this helps!
I use custom toolboxes... easier to see what is going on and minimizes code validation.
But I am sure you can emulate if you have to use the other toolbox form
Yes, I'm using that, too.
I'm looking to make it so either Parameter B or Parameter D must be answered.
It doesn't matter which one of them is answered.
Parameter A | Required |
Parameter B (optional) OR Parameter D (optional) | Required |
Parameter C | Required |
Hi Alfred,
What you are after is Script Tool Paramter Behaviour. You can set the Parameter[i].enabled = True/False to enable disable a parameter. You can apply a condition on Parameter B's values to dynamically enable/disable Parameters C/D.
The logic would be something like the below:
Parameter B should be a MultiValue list with your selectable (filter) options: Function A, Function B
Parameter C has a dependency on Parameter B and is enabled when Parameter B has Function A in its list of values.
Similarly, Parameter D has a dependency on Parameter B and is enabled when Parameter B has Function B in its list of values.
If both Function A and Function B are selected in Parameter B, both Parameter C and D will be selectable.
Hope this helps!
This looks like it should do the trick, thanks!