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.
displayName: 'Parent Code',
required: true, // <-- **HERE**
Do you have an idea if this is possible ?
Perhaps our resident node builder @marcus can help with this one?
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.
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?