Use a Groovy script to define the parameter.
The Script will be evaluated first, and if it fails (e.g. throws an exception), the Fallback Script will be used as a fallback.
This script integrates with Script Security plugin to allow regular Jenkins users to configure this parameter, while limiting what they can do for security.
If this script is used for any of the HTML choice types of an Active Choices Reactive Reference Parameter,
the resulting HTML output will be sanitized to remove everything but basic formatting, like script
tags, unless the script runs outside the sandbox.
This mode requires approval from a Jenkins administrator to prevent cross-site scripting (HTML) and arbitrary code execution (Groovy).