It's all about the answers!

Ask a question

Can I make attribute readonly in current state after clicking on save button?


shweta ranaware (371231) | asked Jul 09 '17, 11:37 p.m.
edited Jul 10 '17, 3:03 a.m. by Ralph Schoon (57.1k23642)

 Hello All,


              Let me explain scenario first, I have Enumeration with Yes, No, Unassigned values. I used applied this enumeration values to radio button attribute. now If in some particular state user selected radio button option(Any option from above Enumeration)  then if user selected values between Yes or No and then click on save button once he/she click on save button attribute should become readonly in current state.
 Is it possible to achieve this using any script, followup action, or any out of box solution.
             If it is possible using follow up action then what will be the logic to make attribute read only in current state.

Thanks in Advance.

Accepted answer


permanent link
Ralph Schoon (57.1k23642) | answered Jul 10 '17, 3:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Unfortunately the description is not very clear, however the basic mechanisms available are advisors/pre-conditoons Read-only by type and state and read-only for condition where you can provide a JavaScript or Java Condition. You can
only make attributes read only (some stuff like comments are not attributes).

You can write a precondition that prevents saving of a work item for certain conditions, but you can not make the attribute presentation read only, so the user can enter values and will only be blocked when trying to save.

There are no other mechanisms available that make things "read only". 


Ralph Schoon selected this answer as the correct answer

Comments
shweta ranaware commented Jul 10 '17, 6:06 a.m.

 Hi Ralph,  

   Thanks for Reply.  As you explained above we can use advisors/pre-conditoons Read-only by type and state and read-only for condition. 
     How I can Achieve the below scenario:
    I have one radio button with Yes, No , Unassigned options.  default value of radio button is Unassigned. In particular state If i select any option "yes" or "No"  then after clicking on save button "radio button" attribute should become read only.
   that means Once I select option value from radio button that attribute should become readonly. How I can achieve this using readonly condition.  
  


Ralph Schoon commented Jul 10 '17, 7:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As already stated, unfortunately the description is not very clear, so I won't answer it as I don't understand it, really.

I can only add that the attribute presentation does not matter. Radio button or whatever has no impact. What does not make sense is the save. What is the change that the save does that is now supposed to prevent the save. If you select another value in your enumeration, the condition should evaluate this immediately and can react to it.

1. if you use read-only for condition the condition can evaluate the current state and other attributes values and take the selected workflow action into consideration as well.



shweta ranaware commented Jul 11 '17, 12:17 a.m. | edited Jul 11 '17, 12:53 a.m.

 Hi Ralph,


      thanks for feedback.. my simple requirement is to make attribute readonly after clicking on save. so Is it possible to make attribute readonly in current state after entering value into that attrubute.


Ralph Schoon commented Apr 17 '18, 8:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

No. You only make an attribute read only based on some value. "After save" is not a valid condition.

Your answer


Register or to post your answer.