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

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

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

0 votes

Comments

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


Accepted answer

Permanent link
 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

0 votes

Comments

Thanks Eric !

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.

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.

1 vote

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

Question asked: Nov 04 '14, 5:41 a.m.

Question was seen: 3,531 times

Last updated: Nov 04 '14, 7:37 a.m.

Confirmation Cancel Confirm