RTC workitem making boolean attributes mandatory
Hi All,
I need to make boolean tye attribute as a required feild in RTC for a particular state. I know there is a precondition(Operation behavior) available however in that there we don't get the attributes with type as boolean.
I have a customized workitem and a attribute which is kind of checkbox, I need to make the checkbox mandatory for a particular state.
Thanks
Kunal.
|
Accepted answer
I suppose that the problem with making checkboxes mandatory is that they have always a value, i.e. "false" when they are not checked and "true" when they are.
You'd better define a different attribute, or write a precondition on WorkItemSave that reads the value of the attribute and returns an error if it is "false".
Kunal N selected this answer as the correct answer
Comments
Kunal N
commented Oct 03 '17, 11:38 a.m.
Thanks for your response Luca.
What if I use a radio button instead of a checkbox with two options. I need to find a way to achieve this without writing a precondition altogether.
Thanks
Kunal
The presentation does not make a difference. A boolean value is always set and there is no unassigned. So mandatory does not make any sense for boolean attributes.
Also writing a custom extension will not help as it also can not detect if the attribute was manually set.
Lucas and Donalds suggestions to use a different attribute that can be unassigned and has two values resembling true and false is the only viable solution here.
Luca Martinucci
commented Oct 04 '17, 4:16 a.m.
Use an enumeration attribute, maybe with just the "true" value.
Kunal N
commented Oct 05 '17, 10:42 a.m.
Hello Luca,
As suggested by you, if we use a enum attribute with only true and unassigned value how can i achieve following:
Suppose I setup enumeration with values as true and assigned then I need to set a condition such that whenever the workitem is in a state "X" it should move to state "Y" only if the enumeration value is selected as "True " by the user.
Thanks
Kunal N
1
Luca Martinucci
commented Oct 06 '17, 8:55 a.m.
Kunal,
Kunal N
commented Oct 06 '17, 10:16 a.m.
Thanks for your help Luca
showing 5 of 6
show 1 more comments
|
One other answer
An alternative is use an enumeration with values "true" and "false". When you don't pick either value, the attribute is "unassigned".
Comments
Kunal N
commented Oct 05 '17, 10:38 a.m.
Hi Donald,
If I go by the way you are suggesting, then How can I achieve following scenario:
Suppose I setup enumeration with values as true, false and assigned then I need to set a condition such that whenever the workitem is in a state "X" it should move to state "Y" only if the enumeration value is selected as "True " by the user.
Thanks
Kunal N
|
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.