Skip to main content
Question

Condition for entering a user parameter depending on the value of another parameter


dhaulagiri
Contributor
Forum|alt.badge.img+4

Is it possible to define the mandatory nature of a user parameter according to the value entered for another parameter?
For example, if the first parameter is checked, then the second must be filled in. Otherwise, the second parameter is not mandatory.
Thanks for your help

2 replies

geomancer
Evangelist
Forum|alt.badge.img+46
  • Evangelist
  • April 9, 2024

You can do the following:

  1. Start with a User Parameter Yes/No (required)
  2. Add a User Parameter Text, required, and only visible when the Yes/No parameter is checked
  3. Add a second User Parameter Text, not required, and only visible when the Yes/No parameter is unchecked
  4. Add a third User Parameter Text, not required and not published, and set its default value to the concatenation of the first and second text

Access the value of this last User Parameter in your workspace.

See the attachment for a very basic workspace.


nielsgerrits
VIP
Forum|alt.badge.img+52

If you use conditional visibility (show parameter 2 only when parameter 1 is yes) and parameter 2 is required, it will ignore the requirement if it is hidden. Tested this in 2023.2.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings