protecting a field based on other fields
Hi All,
I have two radio buttons "Yes" and "No". Now i want to make certain fields protected or read-only when user selects "No". Any thoughts on this ? I have looked at adding a script based condtion as pre-condtion but problem with this approach is that the work item needs to be saved in order to evaluate the conditons. In my case i want script to be triggered as soon as user selects "Yes" or "No"
Thanks
Akshay P.
Accepted answer
and
https://jazz.net/wiki/bin/view/Main/AttributeCustomization
and https://rsjazz.wordpress.com/2015/06/19/a-custom-condition-to-make-attributes-required-or-read-only-by-role/
Comments
Thank you for the response Ralph but as i mentioned in my question, i want my scripts to be executed as soon as value of the attribute changes( when user selects "Yes" or "No"). Like it works in case of validators or calculated values (when added dependency on the fields). Unfortunately i could not find such functionality in the links you have provided :(
1st, the condition and the effect is executed as soon as the value changes in the dependent attribute.
2nd this is the only way this can be done. There is as far as I know no other way to make an attribute read only dynamically.
Process Enactment Workshop for the Rational solution for Collaborative Lifecycle Management explains JavaScript https://jazz.net/wiki/bin/view/Main/AttributeCustomization the JavaScript API and https://rsjazz.wordpress.com/2015/06/19/a-custom-condition-to-make-attributes-required-or-read-only-by-role/ and https://rsjazz.wordpress.com/2015/08/07/a-custom-condition-to-make-attributes-required-or-read-only-by-role-version-2/ explain the mechanism that is used, why it is the only one, and how it works with a Java based example.
This should provide you with all you need.
Hi Ralph,
Yes you are correct!! I am sorry, I was in a assumption that the pre-conditions would execute only after clicking the save button on work item, which is wrong.I implemented it using java script and it working great now !!
Thanks again :)
if you read https://rsjazz.wordpress.com/2015/06/19/a-custom-condition-to-make-attributes-required-or-read-only-by-role/ and https://rsjazz.wordpress.com/2015/08/07/a-custom-condition-to-make-attributes-required-or-read-only-by-role-version-2/ you realize I was as puzzled as you were for the same reason. 8)