Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes


Accepted answer

Permanent link
Precondition read only on condition and a condition. See
Process Enactment Workshop for the Rational solution for Collaborative Lifecycle Management
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/
Akshay Panchakshari selected this answer as the correct answer

0 votes

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 :)

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jul 21 '16, 7:41 a.m.

Question was seen: 1,517 times

Last updated: Jul 21 '16, 11:36 a.m.

Confirmation Cancel Confirm