I have a INodeProperties that is required or not depending on a previous properties selection.
I found in previous thread that we can define dynamic string properties Dynamic Node Properties , however I was not able to apply similar solution for the boolean property.
Hi Wassim,
the displayOptions allow you to show or hide parameters depending on the value of other parameters. The required field cannot be dynamic. If your parameter is required only in certain conditions you can make it optional and implement a check in your node’s execute function (if your node is programmatic style). Once you implemented a check you can throw a NodeOperationError with an error message telling the user that your parameter is required for that operation.
Here are some examples of nodes throwing a NodeOperationError in certain conditions.
Hi @marcus ,
I was wondering if your parameter was of type “options”, how can we address the issue since it is always required even if we change it to false?
or you could show/hide the options parameter using the displayOptions property to create conditions based on other node parameters that determine if it is shown or hidden.