It's all about the answers!

Ask a question

How to get the attribute value of first save, second save, etc??


Sudaraazhi Arivalagan (441728) | asked Nov 04 '14, 5:41 a.m.

Hi,

Can you please anyone help on this below need?

I require to disable one attribute[not editable] once after the first save with referring to its one of the value.

Example:

I have a field called "Flag" ==> True or False values

On its "False" value , it is saved first time, When user try to change its value after the first save, the field should be disabled and should not allow user to change its value.

Looking for the favor from anyone.

Thanks

Sudar


Comments
Sudaraazhi Arivalagan commented Nov 04 '14, 5:44 a.m.

Note: This is a server-side code, should be implemented by Advisors.

Accepted answer


permanent link
Eric Jodet (6.3k5111120) | answered Nov 04 '14, 6:35 a.m.
JAZZ DEVELOPER
 Hello Sudar,
I would try the "Read-Only Attributes For Type and State"
https://jazz.net/library/article/997#dynwflow
and set this attribute as read-only for all states except at creation time.

Eric
Sudaraazhi Arivalagan selected this answer as the correct answer

Comments
Sudaraazhi Arivalagan commented Nov 04 '14, 7:12 a.m.

Thanks Eric !


Sudaraazhi Arivalagan commented Nov 04 '14, 7:18 a.m.

But,

I require, the attribute to be "Read only" if its value was "FALSE" before its first save.

If the attribute value is "TRUE" on its first save, it should be enabled definitely subsequently.

Hope it is clear.


1
sam detweiler commented Nov 04 '14, 7:37 a.m.

you can differentiate between the value BEFORE the save, and the proposed value AFTER the save.  you cannot see the state 10 saves ago. (or even 2)

if the prior state was null, and this state is not, then this is the save on create.(first save)
if the prior state is New and this state is New, then it is a subsequent save. (one of potentially many)

you would have to have another attribute to save the initial value in.

Your answer


Register or 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.