It's all about the answers!

Ask a question

To make a field Mandatory using javascript


Pavithra Kasturirangan (42955956) | asked Aug 05 '12, 9:37 a.m.
 Hi,

I'm trying to apply calculated value attribute customization. I would like to make a field mandatory based on the value selection of another field.  Can someone tell me on what function to be used to make a field mandatory using javascript ?

Accepted answer


permanent link
Henning Sternkicker (40626) | answered Aug 06 '12, 5:19 a.m.
JAZZ DEVELOPER
It seems that what you are looking for is described in this article https://jazz.net/library/article/537
Have a look at the section "Dynamic required attributes".
It should be a good advice to write your own attribute condition.

Hope that helps
Ralph Schoon selected this answer as the correct answer

Comments
Muthukumar C commented Aug 06 '12, 9:19 a.m.

It works great for me !!! The advantage of using this method is that we can get a red * mark based on the value that we are selecting in base enumeration field (Condition field)

3 other answers



permanent link
VK L (8177155159) | answered Mar 04 '13, 8:16 a.m.
 Hi All,

            I followed the link and enabled the dynamic attribute based on another enumeration value. But the * mark doesnt appear to indicate the mandatory attribute. I am using RTC V3.0.1.1 .

I noticed that this issue is fixed - but is it in a later version of 3.0.1?

Thanks.


permanent link
Muthukumar C (32712833) | answered Mar 04 '13, 11:10 p.m.
Hi Valli,

It should work when the condition returns true...

To ensure that, please add console log in the script and check the value of base enumeration and literal.

Or some times, it will take effect after RTC Client restart. post your script for further analysis

Regards
Muthu

permanent link
VK L (8177155159) | answered Mar 05 '13, 1:58 a.m.

Hi Muthu,

                 Script does work - it prevents the workitem save - saying the attribute is mandatory. The problem is that there is no red * indicating that the attribute is mandatory.Just wondering if its a known issue for 3.0.1.1?

RTC Version - 3.0.1.1.


Comments
Muthukumar C commented Mar 05 '13, 2:00 a.m.

Hi Valli, Somebody from Jazz team should confirm this. Its working for me in both 3.0.1.2 and 4.0.0.1


VK L commented Mar 05 '13, 3:25 a.m.

Noticed that


VK L commented Mar 05 '13, 7:54 a.m. | edited Mar 05 '13, 7:56 a.m.

 Wokitem 133631 is related to this - but not sure if its fixed for
3.0.1.1. Can you refer to post https://jazz.net/forum/questions/104627/dynamically-mandatory-attributes-problem-with-indication-rtc-v3011 for the script? Please advise on the script

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.