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 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.
Use an enumeration attribute, maybe with just the "true" value.
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
Kunal,
Thanks for your help Luca
showing 5 of 6
show 1 more comments
|
One other answer
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.