If you would like to add a condition on your Client Script, please use an "if" statement within the script.
The field "Condition / onClick" is not intented to be used and was not designed to work with Client Scripts.
The field "Condition / OnClick" field on Client Scripts are not in use, you can use "if" condition within the script to write any condition as per your business needs.
There is no information about this field in our documentation because this was never usable.
I'm placing this case in "Solution Proposed" state as I have answered your question about this field.
If you have any questions, please let us know, otherwise, please feel free to click on "Accept Solution" to close the incident.