Question

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

  • 9 April 2024
  • 2 replies
  • 30 views

Badge +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

Userlevel 4
Badge +36

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.

Userlevel 6
Badge +33

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